← IGCSE Computer Science Paper 1

Image file size in the unit asked

After finding an image size in bytes, divide by 1024 once for KiB, twice for MiB and three times for GiB, to give the answer in the unit the question asks for.

Understanding Image file size in the unit asked in IGCSE Computer Science Paper 1

What it does: Pixels times colour depth gives bits. Dividing by 8 gives bytes, and dividing by 1024 twice gives 1 MiB. Divide by 1024 once for KiB: 4096 / 1024 = 4 KiB. The 4096 is the size in bytes, so it must be converted. Going to a larger unit means dividing by 1024, so the number gets smaller. Multiplying makes it wrongly bigger.

Common mistakes: The number of pixels is width multiplied by height, so line 1 should be pixels = 800 * 600. Adding them gives the wrong pixel count. The image size in bits is pixels multiplied by colour depth, so line 2 should be bits = pixels * 16. Dividing makes the size far too small.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 69–84) and word search (Modules 59–84).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
An image is 4096 bytes. What is its size in KiB?
4 KiB4096 KiB
Matches
size_KiB = bytes * 1024
↓
It multiplies by 1024 instead of dividing. A KiB is bigger than a byte, so the number must get smaller. Use bytes / 1024.
Applying
Meanings
Term
bytes / 1024 / 1024
Meaning
After finding an image size in bytes, divide by 1024 once for KiB, twice for MiB and three times for GiB, to give the answer in the unit the question asks for.
Practice
width ← 1024
Testing
Gaps
kib = bytes /
Check Answer
Spots
1pixels = 800 + 600
2bits = pixels * 8

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Manta Ray' badge — Graceful Coder, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. An image is 4096 bytes. What is its size in KiB?
A. 4 KiB ✓
B. 4096 KiB
Divide by 1024 once for KiB: 4096 / 1024 = 4 KiB. The 4096 is the size in bytes, so it must be converted.
2. The image size is 5242880 bytes and the question asks for MiB. How many times do you divide by 1024?
A. Twice (bytes to KiB, then KiB to MiB) ✓
B. Once
Each unit step up needs one division by 1024. Bytes to KiB is one step and KiB to MiB is another, so for MiB you divide twice. 5242880 / 1024 / 1024 = 5 MiB.
3. An image is 1024 x 1024 pixels with a colour depth of 8 bits. What is its size in MiB?
A. 1 MiB ✓
B. 8 MiB
1024 x 1024 x 8 = 8388608 bits. Divide by 8 to get 1048576 bytes. Then divide by 1024 twice to get 1 MiB. 8 MiB is what you get if you forget to turn bits into bytes.
4. An image is 2048 x 1024 pixels with a colour depth of 24 bits. What is its size in MiB?
A. 48 MiB
B. 6 MiB ✓
2048 x 1024 x 24 = 50331648 bits. Divide by 8 to get 6291456 bytes, then by 1024 twice to get 6 MiB. 48 MiB comes from leaving the bits as they were and dividing only by 1024 twice.
5. An image uses 256 different colours. Which value do you use for the colour depth in the file size calculation?
A. 256 bits per pixel
B. 8 bits per pixel ✓
The number of colours is 2 to the power of the colour depth. 2^8 = 256, so the colour depth is 8 bits. Use 8 in the size calculation, not 256.

Match the Pairs

bytes / 1024 → Converts an image size in bytes to KiB
bytes / 1024 / 1024 → Converts an image size in bytes to MiB
A 1024 x 512 image with a colour depth of 16 bits, with the size given in MiB: bits to bytes, then divide by 1024 twice → 1024 * 512 * 16 / 8 / 1024 / 1024
An image that uses 256 colours needs a colour depth of 8 bits per pixel, because 2 to the power of 8 is 256 → 2 ^ 8 = 256, so depth = 8
size_KiB = bytes * 1024 → It multiplies by 1024 instead of dividing. A KiB is bigger than a byte, so the number must get smaller. Use bytes / 1024.
size_KiB = (w * h * depth) / 1024 → w * h * depth is in bits, but the code never divides by 8 to get bytes. It should be (w * h * depth) / 8 / 1024.

Key Term

bytes / 1024 / 1024
After finding an image size in bytes, divide by 1024 once for KiB, twice for MiB and three times for GiB, to give the answer in the unit the question asks for.

Fill in the Blanks

1. kib = bytes / 1024
Hint: Type the number you divide by once to turn bytes into KiB.
2. mib = bytes / 1024 / 1024
Hint: Type the arithmetic operator used to divide, repeated once for each unit step.
3. bits = 1024 * 1024 * 24 bytes = bits / 8 mib = bytes / 1024 / 1024
Hint: Type the number of bits in one byte, used to change bits into bytes before dividing for MiB.
4. colours = 256 depth = 8 bits = 1920 * 1080 * depth
Hint: Type the colour depth in bits that gives this number of colours (the power of 2).
5. kib = bytes / 1024 mib = kib / 1024
Hint: Type the number you divide by for the second unit step, from KiB to MiB.

Spot the Error

Question 1
A pixels = 800 + 600
B bits = pixels * 8
C bytes = bits / 8
D KiB = bytes / 1024
Line A — The number of pixels is width multiplied by height, so line 1 should be pixels = 800 * 600. Adding them gives the wrong pixel count.
Question 2
A pixels = 1024 * 768
B bits = pixels / 16
C bytes = bits / 8
D MiB = bytes / 1024 / 1024
Line B — The image size in bits is pixels multiplied by colour depth, so line 2 should be bits = pixels * 16. Dividing makes the size far too small.
Question 3
A pixels = 640 * 480
B bits = pixels * 24
C bytes = bits * 8
D KiB = bytes / 1024
Line C — There are 8 bits in a byte, so converting bits to bytes means dividing by 8. Line 3 should be bytes = bits / 8.
Question 4
A colours = 16
B depth = 4
C bits = 400 * 300 * colours
D bytes = bits / 8
Line C — The size uses the colour depth in bits (4 bits for 16 colours), not the number of colours. Line 3 should be bits = 400 * 300 * depth.
Question 5
A bytes = 3145728
B KiB = bytes / 1024
C MiB = KiB / 1024 / 1024
Line C — The value is already in KiB, so only one more division by 1024 gives MiB. Line 3 should be MiB = KiB / 1024. Dividing twice goes one unit too far.

Student with a class code? Join your class →