← IGCSE Computer Science Paper 1

Converting to a larger unit

To convert to the next larger unit (bytes to KiB, KiB to MiB, MiB to GiB), divide the size by 1024. The answer may not be a whole number.

Understanding Converting to a larger unit in IGCSE Computer Science Paper 1

What it does: Moving up one unit on the ladder always means dividing by 1024, and KiB to MiB is one step up. Going from bytes to the larger unit KiB, divide by 1024. 2048 ÷ 1024 = 2. KiB to MiB is the next unit up, so 3072 ÷ 1024 = 3 MiB. 1536 ÷ 1024 = 1.5, which is not a whole number but is still a correct answer. The fix is mib = kib / 1024, because each unit is 1024 times the one below it.

Common mistakes: This line should print the converted size, kib (3.0 KiB). Printing bytes just shows the original number of bytes, so the conversion is never shown. It should be print(kib). Going to a larger unit makes the number smaller, so you divide by 1024. Multiplying gives a far bigger number. It should be mib = kib / 1024.

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 59–68) 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
To convert bytes to KiB, what do you do?
Divide by 1024Multiply by 1024
Matches
kib = bytes * 1024
↓
Multiplies instead of dividing. Going to a larger unit needs division by 1024, so the answer would be far too big.
Applying
Meanings
Term
divide by 1024
Meaning
To convert to the next larger unit (bytes to KiB, KiB to MiB, MiB to GiB), divide the size by 1024. The answer may not be a whole number.
Practice
sizeBytes ← 5242880
Testing
Gaps
kib = bytes /
Check Answer
Spots
3print("Size in KiB:")
4print(bytes)

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

The 'Pufferfish' badge — Error Handler, 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. To convert bytes to KiB, what do you do?
A. Divide by 1024 ✓
B. Multiply by 1024
KiB is a larger unit, so you need fewer of them. Fewer units means dividing by 1024.
2. Which is the correct conversion of 2048 bytes to KiB?
A. 2048 ÷ 1024 = 2 KiB ✓
B. 2048 × 1024 = 2 097 152 KiB
Going from bytes to the larger unit KiB, divide by 1024. 2048 ÷ 1024 = 2.
3. Convert 5 MiB to GiB. Which method is right?
A. Multiply 5 by 1024
B. Divide 5 by 1024 ✓
GiB is the next larger unit after MiB, so divide by 1024. The answer is about 0.0049 GiB.
4. When you convert to a larger unit, the number you get is usually...
A. Smaller than the number you started with ✓
B. Bigger than the number you started with
A larger unit holds more data, so you need fewer of them. Dividing by 1024 makes the number smaller.
5. Convert 3072 KiB to MiB. Which answer is correct?
A. 3 145 728 MiB
B. 3 MiB ✓
KiB to MiB is the next unit up, so 3072 ÷ 1024 = 3 MiB.

Match the Pairs

kib = bytes / 1024 → Converts a size in bytes to kibibytes by dividing by 1024
gib = mib / 1024 → Converts a size in mebibytes to gibibytes by dividing by 1024
To go from KiB to MiB (the next larger unit), divide by 1024 → mib = kib / 1024
The answer may not be a whole number, e.g. 1536 bytes is 1.5 KiB → 1536 / 1024 = 1.5
kib = bytes * 1024 → Multiplies instead of dividing. Going to a larger unit needs division by 1024, so the answer would be far too big.
mib = kib / 1000 → Divides by 1000 instead of 1024. Storage units in this course use 1024 between each step.

Key Term

divide by 1024
To convert to the next larger unit (bytes to KiB, KiB to MiB, MiB to GiB), divide the size by 1024. The answer may not be a whole number.

Fill in the Blanks

1. kib = bytes / 1024
Hint: Type the number you divide by to go from bytes up to KiB.
2. mib = kib / 1024
Hint: Type the operator that divides, because going to a larger unit makes the number smaller.
3. gib = mib / 1024
Hint: Type the variable holding the size in the smaller unit that is being converted to GiB.
4. bytes = 1536 kib = bytes / 1024 print(kib)
Hint: Type the variable that stores the converted answer, which is not a whole number here.
5. mib = 3584 gib = mib / 1024 print(gib)
Hint: Type the number you divide by to go from MiB up to GiB.

Spot the Error

Question 1
A bytes = 3072
B kib = bytes / 1024
C print("Size in KiB:")
D print(bytes)
Line D — This line should print the converted size, kib (3.0 KiB). Printing bytes just shows the original number of bytes, so the conversion is never shown. It should be print(kib).
Question 2
A kib = 2048
B label = "MiB"
C mib = kib * 1024
D print(mib, label)
Line C — Going to a larger unit makes the number smaller, so you divide by 1024. Multiplying gives a far bigger number. It should be mib = kib / 1024.
Question 3
A mib = 4096
B unit = "GiB"
C gib = mib / 1000
D print(gib, unit)
Line C — Storage units step up in 1024s, not 1000s. MiB to GiB means dividing by 1024, so it should be gib = mib / 1024.
Question 4
A def to_kib b:
B return b / 1024
C print(to_kib(2048))
Line A — A function definition needs brackets around the parameter. It should be def to_kib(b): with the colon at the end.
Question 5
A mib = 3072
B gib = mib * 1024
C print(gib)
Line B — MiB to GiB moves up to a larger unit, so you divide by 1024 instead of multiplying. 3072 MiB is 3 GiB. It should be gib = mib / 1024.

Student with a class code? Join your class →