Revision Notes
Data Representation: Revision Notes
Condensed recall notes on binary, hexadecimal, character sets, images, sound and compression for Cambridge IGCSE Computer Science 0478.
- Subject
- Computer Science
- Level
- IGCSE
- Topic
- Data representation
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to Cambridge IGCSE Computer Science (0478), 2026-2028. Official specification .
Syllabus points this page covers
0478
- 1.1 Number systems
- 1.2 Text, sound and images
- 1.3 Data storage and compression
This page covers all 3 subtopics in topic 1, Data representation.
Condensed for the final weeks. For worked examples, use the Data Representation study guide, which covers Topic 1 (1.1 Number systems, 1.2 Text/sound/images, 1.3 Data storage and compression) in full for Cambridge IGCSE Computer Science 0478, 2026–2028 series. For further exam-style practice with worked answers on this topic, see the Data Representation practice questions.
Number conversions
Denary -> Binary : subtract place values 128 64 32 16 8 4 2 1
Binary -> Hex : split into NIBBLES (4 bits), convert each
Hex digits : 0-9 then A=10 B=11 C=12 D=13 E=14 F=15
Example 217 -> 11011001 -> 1101 1001 -> D9
Hex is used because it is compact and readable for humans: MAC addresses, IPv6, colour codes, memory dumps, error codes.
Binary arithmetic
- Add column by column, carrying when the total reaches 2.
- Overflow — the result needs more bits than the register holds; the extra bit is lost and the answer is wrong.
- Logical shift left = ×2 per place. Right = ÷2 per place. Bits shifted out are lost.
Character sets
| Set | Bits | Characters |
|---|---|---|
| ASCII | 7 | 128 |
| Extended ASCII | 8 | 256 |
| Unicode | 16+ | Very wide range of writing systems |
Unicode supports a very wide range of languages and scripts but can produce larger file sizes than ASCII, though UTF-8 keeps ASCII characters at a single byte.
File size formulas
IMAGE size (bits) = width x height x colour depth
SOUND size (bits) = sample rate x sample resolution x seconds
bits -> bytes : / 8
bytes -> KiB : / 1024 KiB -> MiB : / 1024
- Resolution = number of pixels. Colour depth = bits per pixel; n bits gives 2ⁿ colours.
- Sample rate = samples per second (Hz). Sample resolution = bits per sample.
- Increasing any of these improves quality and increases file size.
Two’s complement
Represents negative numbers in binary. The most significant bit has a negative place value:
8-bit place values: -128 64 32 16 8 4 2 1
Example: represent -19
19 in binary = 00010011
Flip every bit = 11101100
Add 1 = 11101101 <- this is -19
Check: -128+64+32+8+4+1 = -19 (correct)
To convert back to denary, sum the place values directly using the negative value for the leftmost bit — there is no need to reverse the flip-and-add-one process to read a two’s complement number.
Compression
| Lossless | Lossy | |
|---|---|---|
| Data | All recoverable | Permanently discarded |
| Method | Removes redundancy (e.g. RLE) | Removes detail humans barely notice |
| File size | Larger | Much smaller |
| Use for | Text, program files, spreadsheets | Photos, music, video |
Never use lossy for a file where every byte matters — a program would not run.
Run length encoding (RLE) replaces a run of identical repeated values with a single value-and-count pair:
Original: WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW
RLE: 12W 1B 12W 3B 24W 1B 14W
RLE works best on images with large blocks of a single colour (simple graphics, icons); it barely helps a photograph, where colour varies pixel to pixel.
Data storage units
A nibble is 4 bits, and a byte is 8 bits (two nibbles). From the kibibyte upwards, each unit is 1024 times the one before it:
bit -> nibble (4 bits) -> byte (8 bits) -> kibibyte (KiB)
-> mebibyte (MiB) -> gibibyte (GiB) -> tebibyte (TiB)
-> pebibyte (PiB) -> exbibyte (EiB)
The “-bi-” (kibi, mebi, gibi…) naming makes explicit that the factor is 1024, not 1000 — a distinction the syllabus is specific about: it names only these binary units, and file-size calculations must use 1024.
Exam traps
- Divide by 1024, not 1000, for KiB and MiB.
- Don’t forget bits → bytes (÷8) before converting further.
- Sample rate vs sample resolution — these are different things.
- Hexadecimal is for human readability; the computer stores binary.
- Lossy compression is permanent — the data cannot be restored.
- In two’s complement, forgetting to add 1 after flipping the bits — the flip alone gives one’s complement, not two’s complement.
- Applying RLE to a photograph and expecting a large saving — natural images rarely have long runs of identical values, so lossy compression (e.g. JPEG) suits them far better.
- Labelling a 1024-based answer “KB” or “MB” — the syllabus units are KiB and MiB, and the answer must be in the unit the question asks for.
Self-test
- Convert denary 174 to binary and hex.
- An image is 1024 × 768 with 24-bit colour. Give the size in MiB.
- What causes overflow?
- Why is Unicode preferred over ASCII for a multilingual website?
- Which compression type suits a spreadsheet, and why?
- Represent −19 in 8-bit two’s complement.
- Why does RLE compress a simple icon well but a photograph poorly?
Answers: 1. 10101110 → nibbles 1010 1110 → AE. 2. 1024×768×24 = 18,874,368 bits ÷ 8 = 2,359,296 bytes ÷ 1024 = 2304 KiB ÷ 1024 = 2.25 MiB. 3. The result of a calculation requires more bits than the register can hold, so the most significant bit is lost. 4. ASCII cannot represent non-Latin scripts; Unicode covers a very wide range of the world’s writing systems. 5. Lossless — any discarded data would corrupt values and formulas. 6. Write 19 as 00010011, flip every bit to get 11101100, then add 1 to get 11101101. 7. An icon typically has long runs of identical pixel values that RLE can replace with a single value-and-count pair, while a photograph’s colours vary almost pixel to pixel, giving very few long runs to compress.
Frequently asked questions
How do you calculate the file size of an image in IGCSE Computer Science? Multiply width by height by colour depth to get the size in bits, then divide by 8 for bytes and by 1024 for each step to KiB and MiB.
What is overflow in binary addition? Overflow happens when a result needs more bits than the register can hold, so the extra bit is lost and the answer is wrong.
Why is Unicode used instead of ASCII? ASCII uses 7 bits for 128 characters and cannot represent non-Latin scripts, while Unicode covers a very wide range of the world’s writing systems. Unicode can produce larger files, though UTF-8 keeps ASCII characters at one byte.
Why does run-length encoding work badly on photographs? RLE replaces runs of identical values with a value-and-count pair, but a photograph’s colours vary almost pixel to pixel, so there are few long runs to compress. Lossy compression suits photographs better.
Related resources
-
Study guides
IGCSE Computer Science: Data Representation (Cambridge 0478)
Guide to Topic 1 of Cambridge IGCSE Computer Science 0478 (2026-2028): binary, hexadecimal, two's complement, text, sound and images, storage and compression.
Computer Science · Cambridge · IGCSE
Read guide -
Practice questions
Data Representation: Practice Questions
Original exam-style practice questions with full worked answers on binary, hexadecimal, character sets, images, sound and compression.
Computer Science · Cambridge · IGCSE
Try questions -
Revision notes
IGCSE Computer Science: Data Transmission — Revision Notes
Recall notes for Cambridge IGCSE Computer Science 0478 Topic 2: packet switching, serial and parallel transmission, USB, error detection, ARQ and encryption.
Computer Science · Cambridge · IGCSE
Revise topic
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.