Phase 1: Prepare
Step 1 Warm-up recall
From M2.L3: how many bytes does the word “data” take as plain English text?
Private: nothing you type here is sent or stored.
Step 2 Learning goal
By the end of this lesson you can:
- define pixel and colour value (Foundation);
- compute the size of an uncompressed image (Core);
- convert between bits and bytes (Core).
Phase 2: Teach
Step 3 A familiar example
A one-sentence text message and a small photograph are both “data”, yet the photograph takes far more space. Counting pixels shows why.
Step 4 Clear explanation
A digital image is a grid of tiny squares called pixels. Each pixel stores a colour as numbers. In a common scheme, a pixel stores three numbers, one each for red, green and blue, each from 0 to 255, so each colour uses one byte (8 bits) and each pixel uses 3 bytes. The size of an uncompressed image is therefore the number of pixels multiplied by the bytes per pixel.
| Image | Pixels | Bytes per pixel | Size (bytes) |
|---|---|---|---|
| Small icon | 10 × 10 = 100 | 3 | 300 |
| Banner | 100 × 50 = 5,000 | 3 | 15,000 |
| Black and white 8 × 8 | 64 | 1 bit (not 1 byte) | 64 bits = 8 bytes |
A 100 × 50 image has 5,000 pixels and, at 3 bytes each, needs 15,000 bytes. Units: 1 byte is 8 bits. A kilobyte (kB) is 1,000 bytes in the standard decimal (SI) system; some software uses 1,024 bytes and calls it a kibibyte (KiB). So 15,000 bytes is 15 kB. Real files are usually smaller because compression stores repeated patterns in fewer bits, but the uncompressed size is the starting point for any estimate, and you can use it to compare the cost of storing text with the cost of storing pictures.
Notice how this connects to Module 1: the size estimate is itself a short method with a defined input (width, height, bytes per pixel) and output (bytes), the kind of problem stated precisely in the algorithm entry.
Step 5 Worked example (4 marks)
An uncompressed 40 × 30 image uses 3 bytes per pixel. How many bytes?
- Pixels = 40 × 30 = 1,200. (1 mark)
- Bytes = 1,200 × 3 = 3,600. (1 mark)
- In kilobytes: 3,600 ÷ 1,000 = 3.6 kB. (1 mark)
- In bits: 3,600 × 8 = 28,800 bits. (1 mark)
Phase 3: Practise
Step 6 Learner practice (instant-marked)
1. A pixel is:
An image is a grid of pixels.
2. A 10 × 10 image at 3 bytes per pixel is:
100 pixels × 3 = 300 bytes.
3. 1 byte equals:
A byte is 8 bits.
4. Compression is used to:
It stores repeated patterns more compactly.
Phase 4: Close
Step 7 Recap
- An image is a grid of pixels; each stores colour numbers.
- Uncompressed size = pixels × bytes per pixel.
- 1 byte = 8 bits; 1 kB = 1,000 bytes in the SI system.
Step 8 Exit ticket (ungraded)
Compute the uncompressed size of a 20 × 10 image at 3 bytes per pixel.
Private: nothing you type here is sent or stored.
Step 9 Go further (Extension)
Compute how many bytes a 1,000-character message needs, and compare it with the 15,000-byte banner.
Common mistakes
| Mistake | Why it fails |
|---|---|
| Counting bits when the question asks for bytes | Divide by 8 to go from bits to bytes. |
| Forgetting the three colour values | Multiply by bytes per pixel. |
| Assuming the file size equals the uncompressed size | Compression usually makes files smaller. |
Limits. Real image formats add headers, use compression and may use more or fewer bits per colour; the sizes here are estimates for teaching.