Data Representation (PAPER 1) Flashcards
What is a bit
- What two characters represent bits
- What do each of these two show
- What does bit stand for
the smallest measurement of data
- 1 and 0
- 1 shows electricity is flowing, 0 shows it is not flowing
- Binary digit
What are the 8 commonly used units of data
- how do their sizes compare
- What are their symbols
Bit - b
Nibble - 4 bits
Byte - B - 8 bits
Kilobyte - kB - 1000 / 1024 bytes
Megabyte - MB - 1000 / 1024 Kilobytes
Gigabyte - GB - 1000 / 1024 Megabytes
Terabyte - TB - 1000 / 1024 Gigabytes
Petabyte - PB - 1000 / 1024 Terabytes
How many values can a nibble take
- How many can a byte take
Nibble - 2^4 = 16 values
Byte - 2^8 = 256 values
What are the binary and hexadecimal numbers from 0 - 15
D = B = H
0 = 0 = 0
1 = 1 = 1
2 = 10 = 2
3 = 11 = 3
4 = 100 = 4
5 = 101 = 5
6 = 110 = 6
7 = 111 = 7
8 = 1000 = 8
9 = 1001 = 9
10 = 1010 = A
11 = 1011 = B
12 = 1100 = C
13 = 1101 = D
14 = 1110 = E
15 = 1111 = F
Which bit has the largest value
- which has the least value
The left most bit
- the right most bit
What is the value 00110101 in denary
53
What is the value 79 in binary
01001111
What is 10001101 + 0100100 (binary)
11010101
What is an overflow error
When a number has too many bits - a result requires more bits than the CPU is expecting
Which bit will be the first to overflow
- Where will these extra bits be stored
- What is used to show that an overflow error has occured
- The left most bit - most significant
- Elsewhere
- Overflow flags
Add the binary numbers below, giving the answer as an 8-BIT BINARY NUMBER
11010001 + 10010100
101100101
REMOVE THE LEFT MOST BIT
01100101
What is a binary shift
- What happens when a binary number is multiplied by 2, what can it cause
- What happens when a binary number is divided by 2, what can it cause
When every bit in a binary number is moved left or right by a certain number of places
- left shift by 1 place, can cause overflow errors
- right shift by 1 place, can cause bits to ‘drop off’
What identifies how many places a bit moves during a binary shift
The power of 2 that a number is being divided / multiplied by
multiply 00101001 by 8
8 = 2^3
3 place shift to the left
001,01001000 ; [001] will overflow
01001000
divide 00111100 by 4
4 = 2^2
2 place shift to the right
00001111,00 ; [00] will drop off
00001111
What is the alternative name for hexadecimal
Base - 16
What denary numbers can a single hex character represent
- How many bits equate to a single hex character
0 - 15
- 4 bits (a nibble)
What is the hex number 87 in denary
135
What is the denary number 106 in hexadecimal
6A
Why do programmers prefer using hex when coding
- easier to remember large numbers
- less chance of input errors
- easier to convert between binary and hex than binary and denary
What does moving left one space do to the place values in hex
multiply by 16
What are the steps to converting a binary number to hex
- split binary number into nibbles
- convert each nibble to hex