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

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, 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.

Computer Science · Colour depth

What does colour depth really mean?

People describing a bitmap image often mention its colour depth. Be honest: pick the idea closest to what you think it means, then see what happens to it.

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 before you work it out.

Your estimate

500000 pixels

0 pixels1000000 pixels

Same picture, two pixel sizes

Few, large pixelsvsMany, small pixels

Picture one image 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

  • 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

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 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?
Picture element.
Pixel
The smallest single point of colour in a digital image. It holds one colour, stored as a binary code.
Bitmap image
An image made of a grid of pixels in rows and columns, each pixel 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.
In what order are a bitmap's pixels turned into a sequence of bits?
Go row by row, top row first, reading each row left to right, and write the bit for each pixel's colour in that order.
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 in the same space, 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 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.