Skip to content
Marlbridge

Practice Questions

Data Representation: Practice Questions

Original exam-style practice questions with full worked answers on binary, hexadecimal, character sets, images, sound and compression.

Level
IGCSE
Topic
Data representation
Updated

Aligned to Cambridge IGCSE Computer Science (0478), 2026-2028. Official specification .

Syllabus page (what it covers and how it is assessed): Cambridge IGCSE Computer Science.

Syllabus points this page covers

0478

  • 1 Data representation (whole topic)

Found an error? Report a correction.

Need help with this topic? Request a free trial class for IGCSE Computer Science (0478).

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. Convert 10110101₂ to denary and to hexadecimal. [3]

2. Convert 2E₁₆ to denary and to binary. [3]

Section B

3. Explain why computers use binary. [3]

4. Explain why hexadecimal is used by programmers, giving two reasons. [4]

5. Perform the following, stating whether overflow occurs in an 8-bit register:

(a) 01101100 + 00110101 [3] (b) 11010010 + 01100011 [3]

6. An image is 800 × 600 pixels with a colour depth of 24 bits.

(a) Calculate the file size in mebibytes (MiB). [4] (b) Explain the effect of halving the colour depth on quality and file size. [3]

7. Explain the difference between lossy and lossless compression, giving a suitable use for each. [4]

8. Explain how sound is sampled, and the effect of increasing the sample rate. [4]

9. Represent −25 in 8-bit two’s complement, showing your working. [3]

10. Apply run-length encoding to compress the string AAAAAAAAAABBBCCCCCCCCCCCCCCDD (10 A’s, 3 B’s, 14 C’s, 2 D’s). [3]

11. A storage device’s capacity is quoted as 1 KiB rather than 1 KB. Explain the difference between the two, and why the syllabus prefers the “-bi-” naming. [2]

12. A 500-character message is stored once using extended ASCII (8 bits per character) and once using Unicode (16 bits per character). Calculate the size in bytes for each version, and state the difference. [3]


Answers

1. 128 + 32 + 16 + 4 + 1 = 181 [1] [1]; in hex, 1011 = B and 0101 = 5, so B5 [1].

2. 2 × 16 + 14 = 46 [1] [1]; 00101110 [1].

3. Computers are built from transistors and other components that have only two stable states — on and off, high and low voltage [1] [1]. Binary maps directly onto those two states, making circuits simple, cheap and reliable, and less vulnerable to errors caused by small voltage fluctuations [1].

4. It is much shorter than binary — one hex digit represents exactly four bits — so long values are quicker to write and easier to read without losing your place [1] [1]. Conversion between hex and binary is direct and simple, unlike denary, so it is easy to see the underlying bit pattern [1]; it is widely used for memory addresses, colour codes and MAC addresses [1].

5. (a) 01101100 = 108; 00110101 = 53 [1]; sum = 10100001 = 161 [1]; this fits in 8 bits, so no overflow [1]. (b) 11010010 = 210; 01100011 = 99 [1]; sum = 309, which requires 9 bits (100110101) [1]; the ninth bit is lost, so overflow occurs [1].

6. (a) Total bits = 800 × 600 × 24 [1] = 11 520 000 bits [1]; ÷ 8 = 1 440 000 bytes [1]; ÷ 1024 ÷ 1024 = 1.37 MiB [1]. (b) File size halves to about 0.69 MiB [1]; the number of available colours falls from about 16.7 million to 4096 [1], so colour banding appears in gradients and the image looks less realistic [1].

7. Lossless compression reduces file size without discarding any data, so the original can be restored exactly [1]; suitable for text documents, spreadsheets and program files, where any change would corrupt the file [1]. Lossy compression permanently removes data the user is unlikely to notice [1]; suitable for photographs, music and video streaming, where a much smaller file matters more than perfect fidelity [1].

8. The amplitude of the analogue sound wave is measured at regular intervals [1] and each measurement is stored as a binary number [1]. Increasing the sample rate means more measurements per second, so the digital version follows the original wave more closely and sound quality improves [1] — but the file size increases proportionally [1].

9. 25 in binary = 00011001 [1]; flip every bit = 11100110 [1]; add 1 = 11100111 [1].

10. 10A 3B 14C 2D [1] [1] [1] — each run of identical values is replaced by a single value-and-count pair.

11. 1 KiB is exactly 1024 bytes, using the base-2 multiplier that matches how computers actually address memory [1]; 1 KB (kilobyte) means 1000 bytes, so the “-bi-” naming (kibi, mebi…) removes the ambiguity by making the base-2 factor explicit — which is why the syllabus names only the binary units and requires calculations to use 1024 [1].

12. ASCII: 500 × 8 = 4000 bits ÷ 8 = 500 bytes [1]. Unicode (here stored as a fixed 16 bits per character, e.g. UTF-16): 500 × 16 = 8000 bits ÷ 8 = 1000 bytes [1]. Unicode needs 500 bytes more — exactly double, since each character takes twice as many bits in this encoding [1]. Note this is specific to a fixed-width 16-bit encoding: in the variable-width UTF-8 encoding, which is far more common on the web, plain ASCII characters still take only a single byte each, so a message using only those characters would be the same size in ASCII and UTF-8 — it is only the additional, non-ASCII characters that cost extra bytes.


Where marks are usually lost

  • Converting binary to hex via denary and making an arithmetic slip — split into nibbles instead.
  • Forgetting to divide bits by 8 to get bytes.
  • Saying lossy compression can be reversed.
  • Confusing sample rate with sample resolution (bit depth).
  • Forgetting to add 1 after flipping the bits in two’s complement — that gives one’s complement, not two’s complement.
  • Labelling a 1024-based answer “KB” or “MB” instead of KiB or MiB — the syllabus names only the binary units and requires the answer in the unit the question specifies.

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.

Subjects (optional, up to 6)

Choose a qualification to see its subjects.

Related resources

Related articles

Studying this with a teacher

Working through Computer Science IGCSE?

This page is free and stays free. If you would rather be taught it, Marlbridge runs Computer Science classes one-to-one and in small groups of up to 15, online in your own time zone. The first trial class is free. WhatsApp replies within an hour (8am–11pm Pakistan time, every day); email the same day.

Cambridge Computer Science teachers at Marlbridge