Pixels, bits and the mystery image
8 minsA digital bitmap is a grid of tiny squares called pixels. A bit is one binary digit: 0 or 1. In a black-and-white bitmap, one bit can store each pixel because there are only two possible colours. The computer must also know the image width, height and the order in which to read the bits.
Memory is normally grouped into bytes. There are 8 bits in 1 byte.
Think · Pair · Reveal
- Reveal one row and predict the image.
- After four rows, compare predictions with a partner.
- Reveal the remainder. Count its width and height in pixels.
0 of 8 rows revealed.
Learning objectives and image vocabulary
10 minsBitmap or vector?
Stored as a grid of coloured pixels. Photographs are normally bitmaps. Enlarging a small bitmap makes individual pixels visible.
Stored as mathematical descriptions of shapes, lines and fills. It can be resized without becoming pixelated and is useful for logos and diagrams.
Three bitmap terms
Resolution is the width and height in pixels. Colour depth is the number of bits allocated to each pixel and determines how many colours are available. Metadata describes how to interpret the image, including dimensions and colour depth.
The simplified GCSE calculation below gives the uncompressed image data. A real file can be slightly larger because it also contains metadata.
Check the vocabulary
Match each term to the definition just taught, then explain one match aloud.
0 of 3 matched.
Apply it: create and encode a bitmap
15 minsThe Pixel Studio uses a fixed four-colour palette. Four different colours require four distinct binary patterns, so every pixel must be allocated 2 bits: white = 00, navy = 01, pink = 10 and cyan = 11. The displayed values 0–3 are a shorter way to show those patterns.
Resolution: 8 × 8 = 64 pixels
Palette: 4 possible colours
Colour depth: 2 bits for every pixel
Uncompressed pixel data: 64 × 2 = 128 bits = 16 bytes
Encoded pixel values
Partner reconstruction: give your partner only one encoded row and the colour key. They should draw that row without seeing your artwork.
Learn and apply: lossless compression with RLE
15 minsCompression reduces the number of bits needed to store or transmit a file. Lossless compression allows the original data to be reconstructed exactly. Run-length encoding (RLE) is a lossless method that replaces a run of repeated values with the value and its frequency.
0 0 0 1 1 2 2 2 becomes (0,3) (1,2) (2,3). Read this as three zeros, two ones and three twos.Worked decode:
(3,2) (0,4) (1,2) becomes 3 3 0 0 0 0 1 1.RLE is effective only when the saving from long repeated runs is greater than the extra frequency data it stores.
Row A · long runs
RLE: (0,4) (1,4) — only 2 runs
Row B · frequent changes
RLE needs 8 runs and may be larger than the original.
(2,3) (0,2) (1,3), then check that it produces eight pixels.Quality versus file size: lossy or lossless?
10 minsLossless methods preserve every bit of the original and are needed when exact reconstruction matters. Lossy methods permanently remove some data to achieve a smaller file. For photographs, audio and video, carefully chosen loss may be difficult for a person to notice—but repeated compression or a high compression level can create visible or audible artefacts.
Exact recovery
Usually larger file
Suitable for program files, text, diagrams and evidence where detail must not change
Some quality permanently removed
Usually smaller file
Suitable when faster transfer or storage saving outweighs perfect reconstruction
Decision rule: first ask what damage lost detail could cause. Then weigh that risk against storage space, download time and transmission bandwidth.
Build towards the examination question
12 minsUse the same method each time: width × height × colour depth gives bits; divide by 8 for bytes.
Now explain why compression helps the camera transmit over a slow connection and recommend lossy or lossless compression. Connect your recommendation to the scientific purpose of the image.
Review: retrieval sprint
Create my lesson record
Your record includes your pixel artwork, encoded data, activity decisions, calculations and written explanations.
Want the complete resource library?
Explore sequenced Computing resources for Years 7–11.
Explore membership and free lessons