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

8 × 8 pixels · 1-bit

8 by 8 pixel grid, 1 bits per pixel, 2 colours

Paint
Colours2Bit depth1-bit
Click a pixel to repaint it, then read any row left to right: white = 0, black = 1. Challenge: repaint the top row so it reads 11111111.

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.

Computer Science · Colour depth

What does colour depth really mean?

People who describe a bitmap image often mention its colour depth. Pick the idea that is closest to what you think it means, then see how it gets answered.

Which of these is closest to what you think colour depth means?
How sure are you?

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?

Computer Science · Pixel count

How many pixels is that?

A picture is 800 pixels wide and 600 pixels tall. How many pixels does it contain altogether? Slide to your estimate.

Your estimate

500000 pixels

0 pixels1000000 pixels

Same picture, two pixel sizes

Few, large pixelsvsMany, small pixels

Imagine one picture shown at the same size on screen, stored two ways, with the same number of bits for every pixel.

Focus

Number of pixels

Few, large pixels

Few: the grid is coarse

Many, small pixels

Many: the grid is fine

The insight

The picture takes up the same space either way, so more pixels means each one covers a smaller patch.

Detail

Few, large pixels

Fine detail is lost: one pixel has to stand in for a big patch using a single colour

Many, small pixels

Small features can show, because each pixel only covers a tiny patch

Blockiness when enlarged

Few, large pixels

The individual squares show up clearly

Many, small pixels

The squares are small and hard to spot

Data to store

Few, large pixels

Fewer pixel codes, so less data

Many, small pixels

More pixel codes, so more data

Computer Science · Image data

Which image needs the most data?

How much data the image needs to store

1 · Needs the most data4 · Needs the least data
  1. 400 × 300 pixels, 8 bits per pixel

  2. 100 × 100 pixels, 1 bit per pixel

  3. 800 × 600 pixels, 8 bits per pixel

  4. 400 × 300 pixels, 2 bits per pixel

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

1A bitmap image is a grid of pixels. Each pixel is a single colour, stored as a binary code.
2In a black-and-white image each pixel needs 1 bit, for example 0 = white and 1 = black. The grid is stored row by row, each row read left to right.
3Colour depth is the number of bits stored for each pixel. n bits per pixel give 2ⁿ possible colours for that pixel: 1 bit gives 2, 2 bits give 4, 8 bits give 256.
4The number of pixels in an image is its width × height, so 800 × 600 = 480,000.
5More pixels give more detail and a less blocky picture when enlarged. More pixels, or a greater colour depth, mean more data to store.

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
The smallest square of a bitmap image. It holds one colour, stored as a binary code.
Bitmap image
An image stored as a grid of pixels, each with its own colour code.
How many bits does one pixel of a black-and-white image need?
One bit, because two colours are enough: for example 0 for white and 1 for black.
Colour depth
The number of bits stored for each pixel's colour.
How many colours can a pixel be if it uses n bits?
2ⁿ colours. Each extra bit doubles the number: 1 bit gives 2, 2 bits give 4, 8 bits give 256.
Can one pixel hold two colours at once?
No. A pixel stores a single colour code, so it shows one colour at a time.
How do you find the total number of pixels in an image?
Multiply the width by the height, both in pixels.
What does a higher resolution mean for an image?
More (and smaller) pixels, so finer detail and less blockiness when enlarged.
Why does an enlarged low-pixel image look blocky?
Each pixel is one flat colour, so when it is enlarged you can see the individual squares.
What makes an image need more data?
More pixels, more bits per pixel (a greater colour depth), or both.

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 posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

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.