Open the app
  1. Home
  2. Lessons
  3. GCSE & IGCSE Computer Science
  4. Data units, images and sound

Data units, images and sound

🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.

How big is a photo or a song file? You can calculate it from how the data is stored.

Units of size

8 bits = 1 byte.
In binary units, 1 kibibyte (KiB) = 1024 bytes, 1 mebibyte (MiB) = 1024 KiB, and so on.
In decimal units, 1 kilobyte (kB) = 1000 bytes. Use whichever the question asks for.

Images

A bitmap image is a grid of pixels. Colour depth is the number of bits per pixel.
File size (bits) = width × height × colour depth
More pixels (higher resolution) or more colours means a bigger file.

Sound

Sound is sampled. Sample rate is samples per second (Hz). Bit depth is bits per sample.
File size (bits) = sample rate × bit depth × seconds (for one channel)
Divide bits by 8 to get bytes.
Worked example

An image is 100 × 100 pixels with a colour depth of 8 bits. Find its size in bytes.

  1. bits = 100 × 100 × 8 = 80 000 bits
  2. bytes = 80 000 ÷ 8
  3. = 10 000 bytes

Answer: 10 000 bytes

Key idea

8 bits = 1 byte; 1 KiB = 1024 bytes. Image bits = width × height × colour depth. Sound bits = sample rate × bit depth × seconds. Divide by 8 for bytes.

Check you have got it

Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.