GCSE · Computer Science · AQA · Spec 8525
Pixels
Zoom into any photo and it falls apart into tiny squares, each one colour stored as a binary code. So a picture is really just 0s and 1s. Let's prove it.
Computer Science · Representing images
A picture is just a grid of numbers
Eight pixels across, eight down. Each pixel stores one colour as one bit: 0 = white, 1 = black. Read a row left to right and you're reading the stored data. Repaint one pixel and you've changed exactly one bit of 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
- A pixel, short for picture element, is the smallest single point of colour in a digital image.
- Line pixels up in rows and columns and you have a bitmap image: a grid of pixels.
- Every pixel shows exactly one colour at a time, stored as a binary code.
- Black and white only? Then one bit per pixel is enough, for example 1 = black and 0 = white.
- Read the grid row by row, left to right, and the picture becomes one long string of bits.
Have a goA row 3 pixels wide goes black, white, black. Using 1 = black and 0 = white, what bits does that row store?
101
Each pixel becomes one bit, in order from left to right. Writing 010 means the meanings of 0 and 1 got swapped.
- Colour depth is the number of bits stored for each pixel's colour.
- With n bits per pixel there are 2ⁿ possible colours, so 1 bit gives 2 and 8 bits give 256.
Have a goYour mate is certain that 6 bits per pixel gives 12 colours, "because each bit adds two". How many colours do 6 bits really give?
64 colours (2⁶)
Each extra bit doubles the colours instead of adding two, so it's 2 × 2 × 2 × 2 × 2 × 2 = 64, not 6 × 2.
- Image size is width × height in pixels: 800 × 600 means 480,000 pixels.
Have a goA tiny app icon is 32 pixels wide and 32 pixels tall. How many pixels is that altogether?
1,024 pixels
Multiply width by height: 32 × 32 = 1,024. Adding them (64) only counts one row and one column, not the whole grid.
- Squeeze more, smaller pixels into the same space for finer detail; fewer, larger pixels look blocky when enlarged.
- Adding pixels or adding bits per pixel both mean more data to store.
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 totally different picture. Always 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
(12)What is 'pixel' short for?
Pixel
Bitmap image
How many bits does one pixel of a black-and-white image need?
In what order are a bitmap's pixels turned into a sequence of bits?
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 29 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.