Measuring storage and calculating file sizes Cambridge IGCSE Computer Science (9–1) revision
Not started
Learn it
In plain words
Storage is measured in bits and bytes, and then in units that go up by 1024 each time. The names look odd at first, but they follow a pattern: kibi, mebi, gibi, tebi.
Why 1024 and not 1000? Because 1024 is a power of 2 (2 multiplied by itself ten times), and everything in a computer is built on powers of 2.
6 things to know
- A bit is a single 1 or 0. A nibble is 4 bits. A byte is 8 bits.
- 1 kibibyte (KiB) = 1024 bytes. 1 mebibyte (MiB) = 1024 KiB. 1 gibibyte (GiB) = 1024 MiB.
- The pattern carries on: 1 tebibyte (TiB) = 1024 GiB, 1 pebibyte (PiB) = 1024 TiB, 1 exbibyte (EiB) = 1024 PiB.
- To change to a larger unit, divide. Bits to bytes: ÷ 8. Then ÷ 1024 for each step up.
- To change to a smaller unit, multiply by the same numbers.
- Image file size = width × height × colour depth. Sound file size = sample rate × resolution × seconds. Both come out in bits.
Worked example
An image is 2048 pixels by 1024 pixels with a colour depth of 8 bits. Calculate its file size in mebibytes.
- Bits = 2048 × 1024 × 8.
- Divide by 8 for bytes: 2048 × 1024 bytes.
- Divide by 1024 for kibibytes: 2048 KiB.
- Divide by 1024 for mebibytes: 2 MiB.
Tips and tricks
- Use 1024, never 1000, and give the answer in the unit the question asks for.
- Leave the multiplication unfinished and cancel as you go. The numbers are chosen so that the 8 and the 1024s divide out neatly.
- The order from small to large: bit, nibble, byte, KiB, MiB, GiB, TiB, PiB, EiB.
It lands in your notebook with its questions as flashcards.
Measuring storage and calculating file sizes: 6 questions and answers
These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.
How many bits are there in a byte?
And half a byte, 4 bits, is a nibble.
What is a nibble?
One hexadecimal digit is exactly one nibble.
How many bytes are there in a kibibyte?
Each unit is 1024 of the one below.
Which list is in order from smallest to largest?
Kibi, mebi, gibi, tebi.
How many kibibytes are there in 3 mebibytes?
3 × 1024 = 3072.
A file is 16 384 bits. What is its size in kibibytes?Stretch
16 384 ÷ 8 = 2048 bytes, and 2048 ÷ 1024 = 2 KiB.
Quiz
6 questions
Tap an answer and you’ll see straight away whether it’s right, and why.
Worksheet
2 questions, 4 marks. Write your answers on paper, then check them.
Measuring storage and calculating file sizes
Cambridge IGCSE Computer Science (9–1) 0984 · 4 marks · papermunch.org
Name ______________________________ Date ______________
State how many mebibytes there are in 4 gibibytes.[1]
Show answerHide answer
4096. (4 × 1024.)
A text file contains 2048 characters, each stored in 8 bits. Calculate the size of the file in kibibytes.[3]
Show answerHide answer
2 KiB. 2048 × 8 = 16 384 bits. ÷ 8 = 2048 bytes. ÷ 1024 = 2.
Answers: Measuring storage and calculating file sizes
- 1. 4096. (4 × 1024.)
- 2. 2 KiB. 2048 × 8 = 16 384 bits. ÷ 8 = 2048 bytes. ÷ 1024 = 2.



