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 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).
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.
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.
Related resources
-
Study guides
IGCSE Computer Science: Data Representation (Cambridge 0478)
Binary and hexadecimal number systems, how text, sound and images are represented in binary, and data storage and compression – the full content of Topic 1 for Cambridge IGCSE Computer Science 0478, 2026-2028 series.
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
Condensed recall notes on packet switching, transmission methods, error detection and encryption for Topic 2 of Cambridge IGCSE Computer Science (0478), 2026-2028 series.
Computer Science · Cambridge · IGCSE
Revise topic
Related articles
-
teaching
A Level tuition in Dubai: Cambridge or Pearson Edexcel International A Level?
Schools in Dubai and Abu Dhabi teach either Cambridge International AS & A Level or Pearson Edexcel International A Level. How the two are structured, why it matters for tuition, and how online classes from Lahore work.
9 October 2026
-
curriculum guides
Choosing subjects at IGCSE and A Level
How subject choices at 14 and 16 affect university options later, and how to keep pathways open without overloading a timetable.
28 July 2026
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