GCSE · Computer Science · AQA · Spec 8525
Pixels
Zoom into any photo and it breaks into tiny squares. Each square is one colour stored as a binary code. Let's turn a picture into 0s and 1s, and back.
Computer Science · Representing images
A picture is just a grid of numbers
Eight pixels across and eight down. Each pixel stores one colour as one bit: 0 = white, 1 = black. Read a row from left to right and you are reading the stored data.
Predict, then check
Hint: write out every different 2-bit code you can make before you choose.
The smiley's pixels use 1 bit each, which gives 2 colours (a 0 or a 1). If each pixel stored 2 bits instead, how many different colours could one pixel be?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a picture becomes a long string of 0s and 1s, and what changes when you add pixels or bits.
What you need to know
- What a pixel is and what it stores
- How to turn a small black-and-white grid into binary, and binary back into a grid
- What colour depth means and how it sets the number of possible colours
- How the number of pixels and the colour depth affect detail and the data needed
The big picture
A bitmap image is a grid of pixels. Each pixel stores one colour as a binary code, so a picture can be written out as bits, row by row. Colour depth is the number of bits stored for each pixel, and n bits give 2ⁿ possible colours for that pixel. More pixels or a greater colour depth give more detail but need more data.
Key points
Worked example
Problem
A 5 × 5 black-and-white image uses 0 for white and 1 for black. It is stored row by row, top row first, with each row read left to right. (a) Write the binary for this image (■ = black, □ = white): ■■■■■ / □□■□□ / □□■□□ / □□■□□ / □□■□□. (b) A different 5 × 5 image is stored as 0111010001100011000101110. Work out what it shows.
⚠ Watch out
Mixing up the reading rules. Here 0 is white, 1 is black, and rows are read top to bottom, each left to right. Swap the colours or read down the columns and you get a different picture. Check what 0 stands for first.
Memory hook
One pixel, one colour, one code. Add a bit and the colours double: 2, 4, 8 and on to 256 at 8 bits.
Check yourself
A pixel uses 4 bits. How many colours can it be, and why not 4? Answer: 16, because 2 × 2 × 2 × 2 = 16 different codes. Colours are 2ⁿ, not n.
Flashcards
(10)Pixel
Bitmap image
How many bits does one pixel of a black-and-white image need?
Colour depth
How many colours can a pixel be if it uses n bits?
Can one pixel hold two colours at once?
How do you find the total number of pixels in an image?
What does a higher resolution mean for an image?
Why does an enlarged low-pixel image look blocky?
What makes an image need more data?
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 2 October 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.