Year 10 Digital Technologies · Data and Information · 12m read
Data Representation — Binary, Hexadecimal, Text, Images and Compression
Everything digital — photos, messages, music — is stored as 0s and 1s. Year 10 goes deeper into how data is encoded and squeezed into less space.
Learning objective: Represent numbers, text and images in binary and explain lossless and lossy compression.
By the end of this lesson you can:
- I can convert between binary, decimal and hexadecimal.
- I can explain how text and images are stored.
- I can compare lossless and lossy compression.
Binary is a row of light switches. Each switch is on (1) or off (0). Eight switches in a row can show 256 different patterns — enough for every letter, number and emoji code you need, with more switches.
Data Representation — Binary, Hexadecimal, Text, Images and Compression
NUMBER SYSTEMS:
• Binary (base 2), decimal (base 10), hexadecimal (base 16: 0–9, A–F).
• 1 byte = 8 bits; one hex digit = 4 bits.
TEXT:
• ASCII (7/8 bits per character) and Unicode (UTF-8, supports emoji and all languages).
IMAGES:
• Bitmap images are grids of pixels; colour depth = bits per pixel (24-bit = 16.7 million colours).
• File size ≈ width × height × colour depth.
COMPRESSION:
• LOSSLESS — no data lost (PNG, ZIP); e.g. run-length encoding.
• LOSSY — removes less noticeable data (JPEG, MP3); smaller files, some quality loss.
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 5 | 0101 | 5 |
| 10 | 1010 | A |
| 15 | 1111 | F |
| 255 | 1111 1111 | FF |
Key ideas at a glance
- Place values double: 1, 2, 4, 8, 16…
- One hex digit = 4 bits: Group bits in fours.
- Image size = width × height × bit depth: Bits.
- Lossy discards data: Lossless keeps all.
Key formulas
- Image size (bits):
\text{width} \times \text{height} \times \text{colour depth}
Worked example (Medium)
Find the uncompressed size of a 100 × 100 pixel image with 24-bit colour, in kilobytes.
- Bits. 100 × 100 × 24 = 240 000 bits
- Bytes. 240 000 ÷ 8 = 30 000 bytes
- KB. ≈ 30 KB (or 29.3 KiB)
Answer: About 30 KB.
Worked example (Medium)
Calculate the size of a 100 × 100 image with 24-bit colour, in bytes.
- Pixels. 100 × 100 = 10 000.
- Bits. 10 000 × 24 = 240 000 bits.
- Bytes. ÷ 8 = 30 000 bytes (≈ 30 KB).
Answer: 30 000 bytes.
Common mistakes
- Forgetting to divide by 8 Sizes are usually given in bytes. Fix: Convert bits to bytes.
Run-length encoding
RLE is simple lossless compression: "AAAAABBB" becomes "5A3B". It works well for images with large areas of the same colour but can make varied data bigger.
Practice questions
Binary 1101 in decimal is:
- 11
- 13
- 15
- 9
(1 marks)
When should you use lossless compression?
(2 marks)
Hex "A" equals decimal:
- 9
- 10
- 11
- 16
(1 marks)
Convert 1101 binary to decimal.
(2 marks)
Summary
- Binary, decimal, hexadecimal.
- Text via ASCII/Unicode; images via pixels.
- Lossless vs lossy compression.
- Binary, hex, image size, compression.