GCSE Computer Science · Topic 2
Data representation
Data representation is about how computers store everything, from numbers to music, as binary.
We will convert between binary, denary and hexadecimal, use storage units, and do binary addition and shifts.
Then we see how text, images and sound are stored, and how compression makes files smaller.
- 2 subtopics
- 142 questions
- Free: 2.1 notes and 10 questions
In this topic
- 2.1Binary, hexadecimal and unitsFree below · 70 questions
- 2.2Text, images, sound and compressionOpen in Full Marks · 72 questions
2.1 · Free notes
Binary, hexadecimal and units
Key points
- Computers store all data in binary (base 2). Hexadecimal (base 16) is a shorter way to write binary, with each hex digit representing 4 bits.
- Units: 8 bits = 1 byte; 1000 bytes = 1 kilobyte; 1000 KB = 1 megabyte; then gigabyte and terabyte.
- Binary addition follows the rules 0+0=0, 0+1=1, 1+1=10 (carry 1), 1+1+1=11.
- A left binary shift multiplies by 2 for each place shifted; a right shift divides by 2, and bits may be lost.
- Overflow happens when a result needs more bits than are available.
In more detail
- Worked binary to denary: 10110110 = 128 + 32 + 16 + 4 + 2 = 182.
- Worked denary to hex: 182 = 11 × 16 + 6 → B6; check by nibbles: 1011 = B and 0110 = 6.
- Worked hex to denary: 3F = 3 × 16 + 15 = 63.
- Worked addition: 01101011 + 00110110 = 10100001 (107 + 54 = 161).
- Worked shifts: 00010110 (22) shifted left 2 places → 01011000 (88); shifted right 1 place → 00001011 (11).
- Worked units: 3 GB = 3000 MB = 3 000 000 KB (using 1000 per step).
Practice
Binary, hexadecimal and units: 10 questions
Pick an answer to check it, or open the answer for the explanation.
1. What is binary 1010 in denary?
- 8
- 10
- 12
- 1010
Show answer
B: 10. 8 + 2 = 10.
2. How many bits are in a byte?
- 4
- 8
- 16
- 1024
Show answer
B: 8. One byte is 8 bits.
3. What is hexadecimal FF in denary?
- 15
- 16
- 255
- 256
Show answer
C: 255. (15 × 16) + 15 = 255.
4. What is the effect of a left binary shift of one place?
- Divides by 2
- Multiplies by 2
- Adds 1
- Reverses the bits
Show answer
B: Multiplies by 2. Each place shifted left doubles the value.
5. What is overflow?
- Too little data stored
- A result too large for the available number of bits
- A network error
- A syntax error
Show answer
B: A result too large for the available number of bits. Bits are lost, giving an incorrect result.
6. What is binary 11001 in denary?
- 19
- 25
- 26
- 31
Show answer
B: 25. 16 + 8 + 1 = 25.
7. What is denary 12 in hexadecimal?
- A
- B
- C
- D
Show answer
C: C. Hex digits run 0-9 then A-F, so 12 is C.
8. What is a right binary shift of two places equivalent to?
- Multiplying by 4
- Dividing by 4
- Adding 2
- Subtracting 2
Show answer
B: Dividing by 4. Each right shift divides by 2.
9. What is the 8-bit binary number 01101100 in denary?
- 118
- 102
- 108
- 216
Show answer
C: 108. 64 + 32 + 8 + 4 = 108. Place values from the left are 128, 64, 32, 16, 8, 4, 2, 1, and only the bits set to 1 are added.
10. Which is denary 37 written as an 8-bit binary number?
- 00101001
- 00100101
- 10100100
- 00110101
Show answer
B: 00100101. 37 = 32 + 4 + 1, so the bits for 32, 4 and 1 are set: 00100101. 00101001 is 41.
Keep going in Full Marks
Full Marks has 70 questions on Binary, hexadecimal and units (60 more than here), set out in practice levels. You also get notes and 3D models for all 2 subtopics of Data representation, plus games, timed exams and past papers.