Practice Questions
O Level Computer Science: Data Representation — Practice Questions
Original exam-style practice questions with full worked answers on number bases, binary arithmetic, character sets and data storage.
- Subject
- Computer Science
- Level
- O LEVELS
- Topic
- Topic 1 – Data Representation
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to Cambridge O Level Computer Science (2210), 2026-2028. Official specification .
Syllabus topics and points this page is mapped to
2210
- 1 Data representation (topic-level mapping)
"Topic-level mapping" means this page belongs to that topic; it does not claim to cover every point in it.
These are original questions written for Marlbridge, for revision and practice on this content. They are not reproduced past-paper questions, and they do not replicate the exam’s exact structure, question count or mark tariffs — examination boards hold copyright in their own papers. Use these alongside the official past papers available free from your board.
Related: Data Representation revision notes
Section A
1. State the number of bits in a nibble, a byte and a word (typical). [2]
2. List these units in ascending order: KiB, TiB, GiB, MiB, bit, byte. [2]
Section B
3. Convert:
(a) 11001110₂ to denary [2]
(b) 173₁₀ to binary [2]
(c) 9F₁₆ to denary [2]
4. Perform a logical left shift of 2 places on 00010110.
(a) State the result. [1]
(b) State the effect on the denary value. [2]
(c) Explain what happens if a left shift causes a 1 to be lost. [2]
5. Explain how characters are represented in a computer.
(a) State how many characters ASCII can represent and why. [2]
(b) Explain two advantages of Unicode over ASCII. [4]
(c) Explain why the code for “A” is 65 and deduce the code for “D”. [2]
6. A sound file is recorded for 30 seconds at a sample rate of 44 100 Hz with a sample resolution of 16 bits, in mono.
(a) Calculate the file size in mebibytes (MiB). [4]
(b) State two ways the file size could be reduced and the drawback of each. [4]
7. An 8-bit register holds the value 11111111 (255 in denary), and 00000001 (1) is added to it.
(a) Perform the addition and state the 8-bit result. [2]
(b) Explain why this is described as an overflow error. [2]
8. A bitmap image is 200 pixels wide and 150 pixels high, with a colour depth of 8 bits per pixel.
(a) Calculate the file size in kibibytes (KiB). [3]
(b) State one way the file size could be reduced, and the effect this has on image quality. [2]
(c) State one advantage of storing this image as a vector graphic instead, and one situation where a vector graphic would be unsuitable. [2]
9. Run-length encoding is a lossless compression method.
(a) Describe how run-length encoding compresses data. [2]
(b) Explain why run-length encoding can sometimes produce a larger file than the original, and give an example of the kind of data where this happens. [2]
Answers
1. Nibble = 4 bits; byte = 8 bits [1]; a word is typically 32 or 64 bits [1].
2. bit, byte, KiB, MiB, GiB, TiB [2 — 1 mark if one is misplaced].
3. (a) 128 + 64 + 8 + 4 + 2 = 206 [1] [1].
(b) 10101101 [1] [1].
(c) 9 × 16 + 15 = 159 [1] [1].
4. (a) 01011000 [1].
(b) The value is multiplied by 4 — from 22 to 88 [1] [1].
(c) The bit is shifted out of the register and lost [1], so the value is no longer a correct multiplication — the result is wrong because the register cannot hold a number that large [1].
5. (a) 128 characters [1], because standard ASCII uses 7 bits and 2⁷ = 128 [1].
(b) Unicode uses more bits per character, so it can represent far more characters — over a million code points [1] [1]. This means it can represent a very wide range of the world’s writing systems, plus symbols and emoji, so text can be exchanged internationally without corruption [1]; it is also backwards compatible with ASCII for the first 128 characters [1].
(c) The character codes are allocated in sequence starting at 65 for “A” [1]; “D” is three places later, so its code is 68 [1].
6. (a) Bits = 44 100 × 16 × 30 [1] [1] = 21 168 000 bits [1]; ÷ 8 ÷ 1024 ÷ 1024 = 2.52 MiB [1].
(b) Reduce the sample rate — the file gets smaller but higher frequencies are lost and quality falls [1] [1]. Reduce the sample resolution to 8 bits — smaller file but less precise amplitude measurement, so more background noise and distortion [1] [1]. (Also accept: apply lossy compression, which loses data permanently.)
7. (a) 11111111 + 00000001 = 00000000 (with a carry out of the register) [1] [1].
(b) The true sum, 256, needs 9 bits but the register can only hold 8 [1], so the result is too large for the number of bits allocated and the stored value (0) is incorrect [1].
8. (a) file size = 200 × 150 × 8 [1] = 240 000 bits ÷ 8 = 30 000 bytes [1] ÷ 1024 = 29.3 KiB [1].
(b) Reduce the colour depth (e.g. to 4 bits) — smaller file, but fewer colours can be represented, so the image quality falls [1] [1].
(c) Vector graphics scale without loss of quality and are usually smaller for line art [1]; they would be unsuitable for a photograph, which needs the pixel-level detail a bitmap captures [1].
9. (a) It replaces runs of identical, repeated values with a single value and a count of how many times it repeats [1], so repetitive data is stored far more compactly [1].
(b) On noisy or photographic data, where pixel values rarely repeat exactly, encoding each short “run” (value, count) can take more space than the original data [1] — for example, a photograph with continuously varying colours, unlike an image with large uniform blocks of colour [1].
Where marks are usually lost
- Forgetting that a left shift of n multiplies by 2ⁿ, not by n.
- Saying ASCII uses 8 bits (extended ASCII does; standard ASCII uses 7).
- Not converting bits to bytes in file size calculations.
- Confusing sample rate with sample resolution when suggesting reductions.
- Forgetting that overflow means the true result needs more bits than the register holds, not simply that “the answer is wrong”.
- Assuming compression always reduces file size — run-length encoding can enlarge noisy or photographic data with few repeated runs.
Frequently asked questions
How many bits are in a nibble and a byte? A nibble is 4 bits and a byte is 8 bits. From the kibibyte upwards, each storage unit is 1024 times the one before.
What does a logical left shift do to a binary number? A left shift of n places multiplies an unsigned value by 2 to the power n. If a 1 is shifted out of the register it is lost and the result is wrong.
How many characters can ASCII represent in O Level Computer Science 2210? Standard ASCII uses 7 bits, so it can represent 2^7 = 128 characters. Extended ASCII uses 8 bits for 256, and saying ASCII uses 8 bits is a common mistake.
Does compression always make a file smaller? No. Run-length encoding can make noisy or photographic data larger, because values rarely repeat and each short run still needs a value and a count.
Related resources
-
Revision notes
O Level Computer Science: Data Representation — Revision Notes
Recall notes for Cambridge O Level Computer Science 2210 Topic 1: binary, hex, two's complement, shifts, character sets, images, sound, storage and compression.
Computer Science · Cambridge · O Level
Revise topic -
Study guides
Cambridge O-Level Computer Science: Data Representation (2210)
Guide to Topic 1 of Cambridge O Level Computer Science 2210 (2026-2028): binary, hex, overflow, two's complement, text, sound, images and compression.
Computer Science · Cambridge · O Level
Read guide -
Practice questions
Cambridge O-Level Computer Science: Data Transmission — Practice Questions (2210)
Original practice questions with worked answers for Cambridge O Level Computer Science 2210 Topic 2: packets, transmission methods, error checks and encryption.
Computer Science · Cambridge · O Level
Try questions
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.