GCSE · Computer Science · AQA · Spec 8525
Bitmap representation
Every picture on a screen is made of tiny squares of colour, and each square can be stored as 0s and 1s. Here's how a picture becomes binary and back.
Bitmap images
Store a letter A as 0s and 1s
This tiny picture is 4 pixels wide and 4 pixels high. A pixel is one square of colour, the smallest part of the picture. In the listing, # is a black pixel and . is a white one. Step through to turn each row into binary.
Predict before you get there: every pixel in row 3 is black. What will its binary be?
1 KEY2 . white → 03 # black → 145 . # # .6 # . . #7 # # # #8 # . . #
| row | binary |
|---|---|
| key | 1 bit each |
Output
Step 1: First, agree a key: white is 0 and black is 1. The key is a choice, but whoever stores the picture and whoever reads it must use the same one. Two colours need only two codes, so each pixel needs just 1 bit.
Press Next to convert one row at a time. The binary builds up in the Output box.
Colour depth
Want four colours? Give each pixel two bits
The same A, now in colour. Four colours need four codes, and two bits give exactly four: 00, 01, 10 and 11. The number of bits each pixel gets is called the colour depth (the readout says "bit depth"). Choose a swatch, then tap pixels to repaint the A: whatever you paint, every pixel stores one of those four codes.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a picture becomes a list of 0s and 1s, and how that list becomes a picture again.
What you need to know
- A bitmap image is a grid of pixels. A pixel is a single square of colour, the smallest part of the image.
- Each pixel's colour is stored as a binary code, and a key says which code stands for which colour.
- Colour depth is the number of bits used for each pixel. Number of colours = 2 to the power of the colour depth.
- Image size is measured in pixels, written width × height.
The big picture
A bitmap image is a grid of pixels, and each pixel's colour is stored as a binary code looked up in a key. Colour depth is the number of bits per pixel, and the number of colours available is 2 to the power of the colour depth. More colour depth gives more colours and more pixels allow finer detail, but both mean more data to store.
Key points
Worked example
Problem
A black-and-white bitmap image is 3 pixels wide and 3 pixels high. It uses the key 0 = white, 1 = black. Its data is 010111010. Draw the image.
⚠ Watch out
Treating colour depth as the number of colours. A colour depth of 3 means 3 bits per pixel, which gives 2³ = 8 colours, not 3.
Memory hook
Colour depth is the length of each pixel's code, not the size of the paintbox. The paintbox holds 2 to the power of that length: 1 bit, 2 paints; 2 bits, 4 paints; 3 bits, 8 paints.
Check yourself
Cover the page. What does colour depth measure? How many colours does a 2-bit colour depth allow, and what are its four codes? Does doubling an image's width and height give it more colours?
Flashcards
(13)What is a pixel?
What is a bitmap image?
What is colour depth?
How do you work out the number of colours from the colour depth?
Why does a black-and-white image need only 1 bit per pixel?
How many colours can a colour depth of 8 bits give?
What happens to the number of colours each time you add 1 bit to the colour depth?
How is the size of a bitmap image measured?
In a 2-bit image, why is white stored as 00 rather than 0?
What does increasing an image's width and height in pixels do?
What does increasing the colour depth do?
What is the key for, in a bitmap image?
Reading binary back into an image: what tells you where each row ends?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 30 September 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.