Data Representation · 3 question types
Past paper frequency (2018 to 2024)
This topic accounts for approximately 5% of your exam marks.
ASCII/Unicode, sound sampling and pixel/colour depth appear regularly as 2 to 4 mark questions.
A bitmap image is built from a rectangular grid of tiny coloured squares called pixels (short for "picture elements"). Every pixel stores a single binary code that names its colour.
A typical photograph is a bitmap. So is the screenshot of a screen, or a saved image file in .png or .bmp format.
Two parameters control the quality of a bitmap image: resolution and colour depth.
Resolution is the total count of pixels that make up an image, usually quoted as width × height.
A larger pixel count means finer detail in each picture and more bits needed for storage.
Note on display jargon: displays are commonly labelled by their vertical pixel count, so "1080p" means 1080 pixels vertically (1920 × 1080) and "4K" refers to roughly 4000 pixels horizontally (3840 × 2160). For exam calculations, always use both dimensions.
Colour depth is the count of bits assigned to record one pixel's colour.
With n bits per pixel, the image can contain 2ⁿ different colours:
| Colour depth (bits) | Number of colours | Typical use |
|---|---|---|
| 1 | 2 | Black-and-white (1 = white, 0 = black) |
| 2 | 4 | Very simple icons |
| 4 | 16 | Older indexed-colour formats |
| 8 | 256 | GIF; older video games |
| 16 | 65 536 | "High colour" |
| 24 | 16 777 216 | "True colour"; standard for photographs |
A higher colour depth means the image can store more subtle shades and gradients, but each pixel takes more storage space.
| Parameter | If increased | Effect on quality | Effect on file size |
|---|---|---|---|
| Resolution | More pixels | Sharper; more detail | Larger |
| Colour depth | More bits per pixel | More distinct colours | Larger |