Skip to content
IGCSE·Tuition
Computer Science · Lesson

Convert storage units using the specified convention

A correct calculation can still lose the final mark when the answer sits in the wrong unit.

On this page
  1. What are the units and factors?
  2. How do you convert, step by step?
  3. Worked example
  4. The mistake to watch for
  5. Check yourself
  6. Where this leads next

To convert storage units, divide to move to a bigger unit and multiply to move to a smaller one, using the factor of the convention the question states. In the binary convention the factor between neighbouring byte units is 1 024, and between bytes and bits it is 8.

This lesson finishes images, sound and storage. Without it, the size you calculated in image size or audio size stays as an unreadable number of bits.

What are the units and factors?

UnitSymbolBinary conventionDecimal convention
Bitbsmallest unitsmallest unit
ByteB8 bits8 bits
Kibibyte / kilobyteKiB / kB1 024 bytes1 000 bytes
Mebibyte / megabyteMiB / MB1 024 KiB1 000 kB
Gibibyte / gigabyteGiB / GB1 024 MiB1 000 MB
Tebibyte / terabyteTiB / TB1 024 GiB1 000 GB

Many Cambridge Computer Science materials use the binary names (kibibyte, mebibyte, gibibyte). Check the current syllabus for the exact convention in your exam year, and always follow any convention printed in the question.

How do you convert, step by step?

  1. Write the starting unit and the target unit.
  2. Decide the direction. Bigger target means divide. Smaller target means multiply.
  3. Apply one factor at a time (bits to bytes: ÷ 8; bytes to KiB: ÷ 1 024; KiB to MiB: ÷ 1 024).
  4. Sense-check: the number should be smaller after moving to a bigger unit.

Worked example

A video clip file is 5 242 880 bytes. Give its size in KiB and in MiB, using 1 KiB = 1 024 bytes and 1 MiB = 1 024 KiB.

Step 1, bytes to KiB: 5 242 880 ÷ 1 024 = 5 120 KiB.

Step 2, KiB to MiB: 5 120 ÷ 1 024 = 5 MiB.

Check: 5 MiB × 1 024 × 1 024 = 5 × 1 048 576 = 5 242 880 bytes. This matches the start.

Decimal comparison: if the question used decimal units, 5 242 880 bytes = 5 242.88 kB = 5.24288 MB. The different factor gives a different number, which is why the convention must be stated.

The mistake to watch for

A common slip is to use 1 000 when the question states 1 024, or to divide when you should multiply.

Mistaken answer: “3 MiB in KiB: 3 ÷ 1 024 = 0.0029 KiB.”

The student divided, but KiB is a smaller unit than MiB, so the number must grow, not shrink.

The correction: KiB is a smaller unit, so the number gets bigger. 3 MiB = 3 × 1 024 = 3 072 KiB. A sense check helps here: one MiB contains 1 024 KiB, so 3 MiB must contain more than 1 024 KiB.

Check yourself

Try these, then open each answer.

1. Convert 12 MiB to bytes (binary convention).

Show answer

12 × 1 024 = 12 288 KiB. 12 288 × 1 024 = 12 582 912 bytes.

2. Convert 6 144 KiB to MiB.

Show answer

6 144 ÷ 1 024 = 6 MiB.

3. A file is 65 536 bits. Give its size in bytes and in KiB.

Show answer

Bytes = 65 536 ÷ 8 = 8 192 bytes. KiB = 8 192 ÷ 1 024 = 8 KiB (8 192 bytes).

Where this leads next

You now have every step needed for a full size question. Combine them in the images, sound and storage practice set. The Python reasoning sandbox can check a conversion as code.

If you convert correctly in class but slip under timed conditions, a teacher can look at your working with you in online one-to-one Computer Science tuition.

Questions people ask

How many bytes are in a kibibyte?

In the binary convention, 1 KiB = 1 024 bytes, 1 MiB = 1 024 KiB and 1 GiB = 1 024 MiB. The decimal convention uses 1 000 instead, with names such as kB and MB. Use whichever the question states, and check your syllabus for the one it expects.

Do I multiply or divide when going to a bigger unit?

Divide. A bigger unit holds more, so you need fewer of them. Going from bytes to KiB means dividing by 1 024. Going from MiB down to KiB means multiplying by 1 024. A quick sense check on the size of the answer catches wrong directions.

What is the difference between a bit and a byte?

A bit is one binary digit, 0 or 1. A byte is 8 bits. File sizes are usually given in bytes and data speeds in bits per second, so reading the unit carefully matters.

Updated:

Your next step

If unit conversions keep going the wrong way round, a one-to-one teacher can give you a simple checking habit and drill it until the direction is automatic.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parents: enquire here

  • 9,000+ students helped through our service
  • 9+ years helping IGCSE students