GCSE · Computer Science · Eduqas · Spec C500QS

Calculating image storage

A photo feels like a picture, but to a computer it is a pile of 0s and 1s, and you can count them exactly.

Computer Science · Data representation

Count the bits in a tiny picture

4 × 3 pixels · 2-bit

4 by 3 pixel grid, 2 bits per pixel, 4 colours. Total storage: 24 bit

Paint
Colours4Bit depth2-bitTotal storage24 bit
pick a colour, then click pixels to paint them

This picture is 4 pixels wide and 3 high, so 4 × 3 = 12 pixels. Each pixel stores a 2-bit code: 00 white, 01 teal, 10 orange, 11 navy. That is 2² = 4 possible colours. Twelve pixels with 2 bits each makes 12 × 2 = 24 bits. Now paint some pixels. The picture changes, but does the total?

Exam line: Storage in bits = width × height × colour depth. The pixel count is width × height, and every pixel holds colour-depth bits.
Watch out: Colour depth is bits PER PIXEL, not the number of colours. 2 bits per pixel gives 2² = 4 colours, not 2.

Colour depth

How many bits for 16 colours?

Two pictures. One uses exactly 16 different colours. The other needs 100 different colours. For each one you have to choose a colour depth, which means bits per pixel.

Which idea is closest to how you would work out the bits per pixel?
How sure are you?

Computer Science · Data representation

File size — built from a few factors

Stay on the Image tab. Start at 800 × 600 with 24 bits per pixel and read the ladder from the top. Then nudge the colour depth down to 8 and watch every rung shrink.

Width

800 px

Height

600 px

Colour depth

24 bits

Formula

size (bits) = width × height × colour depth

File size1.37 MB
Bitswidth × height × colour depth11,520,000 bits
÷ 88 bits = 1 byte1,440,000 bytes
÷ 10241024 bytes = 1 KB1406.25 KB
÷ 10241024 KB = 1 MB1.37 MB

Your turn

Pixels → bits → bytes → KB

An image is 200 pixels wide and 100 pixels high, and it has 16 colours, which needs a colour depth of 4 bits. Work out the storage for its pixel data one step at a time. Type plain numbers with no commas (80000, not 80,000).

  1. Step 1: Number of pixels
  2. Step 2: Total bits
  3. Step 3: Bytes
  4. Step 4: Kilobytes
  5. Final question: On your own
What you are given
QuantityValue
Width200 pixels
Height100 pixels
Colour depth4 bits per pixel
  1. Step 1 of 4: Number of pixels

    How many pixels are in the grid?

    Give your answer to 0 decimal places. Choose its unit.

  2. Step 2 of 4: Total bitsOpens when the step before it is right.
  3. Step 3 of 4: BytesOpens when the step before it is right.
  4. Step 4 of 4: KilobytesOpens when the step before it is right.

Working backwards

Find the colour depth

A 400 × 300 image has its pixel data stored in 120,000 bytes. What is its colour depth?

  1. The image has 400 × 300 = 120,000 pixels.
  2. missing step
Which line is step 2?

Predict, then check

Commit to an answer first. The reveal explains where the number comes from.

A photo is 1000 × 800 pixels at 8 bits per pixel. You double both its width and its height to 2000 × 1600, keeping 8 bits per pixel. What happens to the storage it needs?

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

How many bits does a picture take? Count the pixels, count the bits in each one, then climb the units.

What you need to know

  • A bitmap image is a grid of tiny squares called pixels, and each pixel's colour is stored as a binary number.
  • Image dimensions are the width and height in pixels, so the total number of pixels = width × height.
  • Have a goA classmate swears a 10 × 5 icon has 15 pixels, because 10 + 5 = 15. Are they right?

    No. It has 10 × 5 = 50 pixels.

    The pixel count is width × height. Adding the sides only measures the edge of the grid, not every pixel inside it.

  • Colour depth is the number of bits used to store the colour of each pixel.
  • With n bits per pixel you get 2^n colours: 1 bit gives 2, 4 bits give 16, 8 bits give 256.
  • Have a goHow many different colours can one pixel show if its colour depth is 3 bits?

    8 colours.

    n bits give 2^n colours and 2^3 = 8. The 3 counts bits, not colours.

  • Need a stated number of colours? Find the smallest n where 2^n is at least that number: 16 colours need 4 bits.
  • Storage in bits = width × height × colour depth. Divide by 8 to turn bits into bytes.
  • Base 2 units: 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB.
  • Have a goYour friend says 3000 KB is more than 3 MB. Work out which one is really bigger before you look.

    3 MB is bigger: it is 3 × 1024 = 3072 KB.

    1 MB = 1024 KB in Base 2, not 1000 KB, so 3 MB is 3072 KB, which beats 3000 KB.

  • Divide by 1024 for each step up a unit, multiply by 1024 for each step down, then pick a readable unit.
  • To find an unknown, rearrange, but convert the size to bits first. Colour depth = bits ÷ (width × height).
  • Storage is directly proportional to each factor: double the colour depth and it doubles; double width and height and it quadruples.

The big picture

A bitmap image is a grid of pixels, and each pixel's colour is stored as a binary number. Colour depth is the number of bits per pixel, and n bits give 2^n colours. Storage for the pixel data is width × height × colour depth in bits; divide by 8 for bytes, then by 1024 for each step up to KB, MB, GB and TB. A real file is slightly larger because it also stores metadata.

Key points

1Storage (bits) = width × height × colour depth.
2Colour depth is bits per pixel, not the number of colours. n bits give 2^n colours.
3Bits to bytes: ÷ 8. Up a unit: ÷ 1024. Down a unit: × 1024.
4To find a missing value, convert the size to bits first, then rearrange.
5Doubling the colour depth doubles the storage. Doubling both width and height quadruples it.
6The calculation covers the pixel data only. A real file also stores metadata, so it is slightly larger.

Worked example

Problem

A black-and-white image is 100 pixels wide and 50 pixels high. Each pixel uses a colour depth of 1 bit. How much storage does its pixel data need?

⚠ Watch out

Treating colour depth as the number of colours, so 16 colours becomes 16 bits. Colour depth is bits per pixel: 16 colours need only 4 bits, because 2^4 = 16. The runners-up are forgetting the ÷ 8 and dividing by 1000 instead of 1024.

🧠

Memory hook

Count the bits, then climb: width × height × depth, ÷ 8 for bytes, ÷ 1024 for every rung up.

✓

Check yourself

Cover the page. A 640 × 480 image has 8-bit colour depth. Find its size in bits, bytes and KB, then say what doubling the depth does. (300 KB; doubling makes it 600 KB.)

Flashcards

(12)
How is a bitmap image stored?
As a grid of pixels, with the colour of each pixel stored as a binary number.
How do you find the total number of pixels?
Width × height, with both measured in pixels.
What is colour depth?
The number of bits used to store the colour of each pixel.
How many colours can n bits give, and what are the values for 1, 4, 8 and 24 bits?
2^n colours: 2, 16, 256 and 16,777,216.
How do you find the colour depth needed for a stated number of colours?
Find the smallest n for which 2^n is at least that number of colours. 16 colours need 4 bits.
What is the formula for image storage in bits?
File size (bits) = width × height × colour depth.
How do you change bits into bytes?
Divide by 8, because 8 bits = 1 byte.
What are the Base 2 unit relationships?
1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB (1024 = 2^10).
How do you move up or down the units?
Divide by 1024 for each step up, multiply by 1024 for each step down. Choose a unit that gives a readable number.
You know the size in bytes and need the colour depth. What is the first move?
Multiply by 8 to get bits. Then divide the bits by the number of pixels.
What does doubling each factor do to storage?
Doubling the colour depth doubles it. Doubling both width and height multiplies it by 4.
Why is a real image file a little bigger than the calculated size?
The calculation gives the pixel data only. The file also stores metadata, such as width, height and colour depth.

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.