GCSE · Computer Science · Eduqas · Spec C500QS

Digital storage of graphics

Your computer doesn't keep your pictures as pictures. It keeps a long list of binary codes.

​

Computer Science · Graphics

One tiny picture, three ways of looking at it

  1. 1 Explore
  2. 2 Translate

Model. A tiny 4 × 3 picture with only four colours, so you can see every pixel and every code. Real images have far more pixels. The key (00, 01, 10, 11) belongs to this example.

Step 1 · Explore

Tap a pixel in the grid, then tap a colour in the key. See where else that colour turns up? Then switch views and tap again.

Linked parts: select one to follow it through every representation
Column 1Column 2Column 3Column 4

The picture on screen: 12 pixels, and every pixel shows just one colour.

Linked parts tried: 0 of 2.

Predict, then check

Same 12 codes, same order, same key. Only the number of pixels per row changes.

A picture is stored as these 12 codes (00 white, 01 black, 10 red, 11 yellow): 01 10 10 01 10 11 11 10 00 10 10 00. It was made 4 pixels across. The computer wrongly lays the very same codes out 3 pixels across instead. What does it show?

Computer Science · Colour depth

How many colours can 8 bits show?

An image uses a colour depth of 8 bits per pixel. How many different colours can each pixel show? Slide to your estimate, then lock it in.

Your estimate

150 colours

0 colours300 colours

Computer Science · Data representation

File size — built from a few factors

This works out the data the pixels need (not the metadata). Stay on Image. It starts at 8 × 8 pixels with 2 bits each. Change one factor at a time and watch the Bits row, then the bytes row (8 bits = 1 byte). Ignore the rows below bytes.

Width

8 px

Height

8 px

Colour depth

2 bits

Formula

size (bits) = width × height × colour depth

File size16 bytes
Bitswidth × height × colour depth128 bits
÷ 88 bits = 1 byte16 bytes
÷ 10241024 bytes = 1 KB0.02 KB

Computer Science · Checking working

Where does this working go wrong?

A student works out how much data the pixels of a 16 × 8 image need when each pixel uses 2 bits. Tap the first line where the working goes wrong.

A student's working — which line goes wrong?

Computer Science · Graphics

Which of these do you believe?

Four students are revising how digital images are stored. Each says what they think.

Which one is closest to what you think right now?
How sure are you?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

A picture on screen is really a list of binary codes. Here is how that works.

What you need to know

  • A digital image like this is a grid of very small dots of colour called pixels (picture elements).
  • A pixel is the smallest individual element of the image, and each pixel shows a single colour.
  • Have a goA mate says the dot at the edge of a cloud in a photo is 'half sky-blue, half cloud-white'. Can one pixel be that? Have a go before you look.

    No. A pixel shows a single colour.

    A pixel is the smallest individual element of the image, so there is nothing smaller inside it to show a second colour.

  • Raster and bitmap are two names for the same type of image, so the terms are interchangeable.
  • Each pixel's colour is stored as a binary code, and each different colour gets its own different code.
  • All the pixel codes are held in a set order, so the computer can rebuild the image pixel by pixel.
  • Have a goSay 10 means red and 00 means white. A short run of pixels is stored as 10 00 00 10. Which colours are they, in order?

    Red, white, white, red.

    Each code gives the colour of one pixel, and the computer reads them in the order they are stored.

  • Image files also store metadata, which is data about the data: facts about the image itself.
  • Metadata includes the image's dimensions, its width and height in pixels, so the codes can be laid out in rows and columns.
  • Colour depth is the number of bits used for each pixel's colour; n bits can show 2ⁿ different colours.
  • Have a goYour classmate says 3 bits per pixel gives 3 × 2 = 6 colours. Check the sum: how many colours does it really give?

    8 colours (2³ = 2 × 2 × 2).

    With n bits you get 2ⁿ colours, so every extra bit doubles the number. It is not n × 2.

  • Resolution is the number of pixels in the image, given by its width and height in pixels.
  • Every pixel needs colour-depth bits, so more pixels, or more bits per pixel, means more data to store.

The big picture

A raster (bitmap) image is a grid of pixels, and each pixel shows one colour. Each colour is stored as a binary code, and the codes of all the pixels are held in a set order. Metadata, including the width and height, helps the computer rebuild the picture. With n bits per pixel there are 2ⁿ possible colours, and the resolution and colour depth together decide how much data the pixels need.

Key points

1A raster (bitmap) image is a grid of pixels, and each pixel shows a single colour.
2The image is stored as a binary code for each pixel's colour, with the codes held in a set order.
3Metadata is data about the data. It includes the width and height, so the codes can be arranged into rows and columns.
4Colour depth is bits per pixel (n bits gives 2ⁿ colours), and resolution is the number of pixels.
5More pixels or a bigger colour depth means more data for the pixels.

Worked example

Problem

A 20 × 10 pixel image uses a colour depth of 4 bits. How many colours can it show, and how many bytes of data do its pixels need?

⚠ Watch out

Treating the pixel-data size as the size of the whole file. The calculation only covers the pixels' colour codes. The metadata is extra data stored as well.

🧠

Memory hook

A picture is a queue of colour codes. The metadata is the note that says how wide to wrap the queue.

✓

Check yourself

Cover the page and explain to a friend how a pixel's colour is stored, and what the computer needs to rebuild the picture.

Flashcards

(11)
What is a pixel?
The smallest individual element of a digital image (a picture element). Each pixel shows a single colour.
Raster or bitmap: what is the difference?
None. They are two names for the same type of image, so the terms are interchangeable.
How is each pixel's colour stored?
As a binary code. Each different colour has its own different code.
How can the computer rebuild a stored image?
The binary codes of all the pixels are held in a set order, so it places each pixel back in its position.
What is metadata?
Data about the data: extra facts about the image itself, stored as well as the pixel data.
Which metadata does the computer need to lay out the pixels?
The image's dimensions (width and height in pixels), so it can arrange the pixel codes into rows and columns.
What is colour depth?
The number of bits used to store the colour of each pixel.
How many colours do n bits per pixel give?
2ⁿ different colours. For example, 2 bits give 2² = 4 colours.
What is resolution?
The number of pixels that make up the image, given by its width and height in pixels.
What decides how much data the pixels need?
Every pixel needs colour-depth bits, so more pixels or more bits per pixel means more data.
How do you calculate the pixel data in bytes?
Width × height × colour depth gives bits. Then divide by 8 to get bytes.

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 Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)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 16 November 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.