Unit 6 Data Types Flashcards
What are Primitive Data Types?
A set of basic data types from which all other data types are constructed
What is an Integer?
A whole number
What is a Float?
A decimal number
What is a Boolean?
True or false
What is a Character?
A letter, number, or special symbol
What is a String?
Anything enclosed in quote marks
Are all Data Types held in Binary?
Yes
How many digits does the Binary System use?
Two, 0 and 1
What many digits does the Denary/Decimal System use?
Ten, 0 - 9
What does it mean when Number Systems are referred to by their Base?
Base refers to how many symbols are used to construct values
What Base is Denary?
Base 10
What Base is Hexadecimal?
Base 16
What Base is Binary?
Base 2
How does Hexadecimal use letters?
It uses letters for the values 10 to 15
Why are Hexadecimal Numbers used? (5)
- Easier to read than binary
- Quicker to type
- Less chance of making an error when typing compared to binary
- Used to define colours
- Easy to convert to and from binary
What is a Byte?
A collection of 8 bits
How many Bytes are in a Kilobyte?
10^3 or 1,000
How many Bytes are in a Megabyte?
10^6 or 1,000,000
How many Bytes are in a Gigabyte?
10^9 or 1,000,000,000
How many Bytes are in a Terabyte?
10^12 or 1,000,000,000,000
How many Bytes are in a Kibibyte?
2^10 or 1,024
How many Bytes are in a Mebibyte?
2^20 or 1,048,576
How many Bytes are in a Gibibytes?
2^30 or 1,073,741,824
How many Bytes are in a Tebibyte?
2^40 or 1,099,511,627,776
What does ASCII stand for?
American Standard Code for Information Interchange
What Bit Character Set does ASCII have?
7 Bit
How many possible Binary Codes can ASCII have?
2^7 or 128
What is Unicode?
An international encoding standard for use with different languages and scripts, by which each letter, digit, or symbol is assigned a unique numeric value that applies across different platforms and programs
What are examples of Arithmetic Operators? (4)
- Addition
- Subtraction
- Multiplication
- Division
What are examples of Comparison Operators? (4)
- Equal
- Not equal
- Greater than
- Less than
What is one method of representing negative numbers in Binary?
Sign and magnitude. The first bit acts as the sign, 0 for + and 1 for -
What is the most common method of representing negative numbers in Binary?
Two’s Complement. The two’s complement of a signed binary value is found by flipping all of the bits and adding one
What are Fractional values?
Negative powers of 2
What is Fixed-point Binary?
A fixed-point binary value uses a specified number of bits where the placement of the binary point is fixed
What is Normalisation?
The process of moving the binary point of a floating point number to provide the maximum level of precision for a given number of bits
This is achieved by ensuring that the first digit after the binary point is a significant digit
What are the 2 ways Bits can be manipulated?
- Using shift instructions to move bits left or right
- Using logical instructions NOT, AND, OR and XOR with appropriate masks