All subjects · Computer Science · WCP01 Principles of Computer Science

Units of data: bits, bytes, binary and decimal prefixes

Edexcel IAL Computer Science · WCP01 Principles of Computer Science

File sizes use binary prefixes such as KiB and MiB; transmission speeds use decimal prefixes such as kbit/s and Mbit/s. You need to rank, convert and count states (spec point 2.1.2).

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

Binary units

The number of different values (states) that n bits can represent is 2n. For example 8 bits give 28 = 256 states, so an unsigned byte holds 0 to 255. To represent k different items you need the smallest n with 2n ≥ k.

Binary (IEC) and decimal (SI) prefixes

Binary (IEC)ValueDecimal (SI)Value
kibi (Ki)210 = 1024kilo (k)103 = 1000
mebi (Mi)220 = 1 048 576mega (M)106
gibi (Gi)230giga (G)109
tebi (Ti)240tera (T)1012

Each binary step is x 1024; each decimal step is x 1000.

Which to use

The benefit of separate prefixes is precision: 1 GiB is about 7% bigger than 1 GB, and the gap grows with each prefix, which matters when quoting storage sizes. The drawback is that many people (and some software) still use 'kilobyte' loosely for 1024 bytes, which causes confusion.

Worked example

How many bits are in a 3 MiB file?

  1. 3 MiB = 3 x 220 bytes
  2. = 3145728 bytes
  3. x 8 = 25165824 bits

Answer: 25165824 bits (3 x 223)

Key idea: Nibble 4 bits, byte 8 bits; n bits give 2n states. KiB, MiB, GiB, TiB are powers of 1024 for sizes; k, M, G, T are powers of 1000 for speeds.

Check yourself

  1. How many different states can 6 bits represent?
    Show answer

    64. 26 = 64.

  2. A school needs a unique binary code for each of 300 students. What is the minimum number of bits needed?
    Show answer

    9. 28 = 256 is too few; 29 = 512 is enough, so 9 bits.

  3. How many bytes are in 5 KiB?
    Show answer

    5120 bytes. 5 x 1024 = 5120 bytes.

  4. How many bits are in 2 KiB?
    Show answer

    16384 bits. 2 x 1024 x 8 = 16384 bits.

  5. How many MiB are in 3 GiB?
    Show answer

    3072 MiB. 3 x 1024 = 3072 MiB.

  6. A connection runs at 40 Mbit/s. How many bits does it send per second?
    Show answer

    40000000. 40 x 106 = 40 000 000 bits per second (decimal prefix).

  7. Which list is in order from smallest to largest?
    • 1 kB, 1 KiB, 1 MB, 1 MiB
    • 1 KiB, 1 kB, 1 MiB, 1 MB
    • 1 MB, 1 MiB, 1 kB, 1 KiB
    • 1 kB, 1 MiB, 1 KiB, 1 MB
    Show answer

    1 kB, 1 KiB, 1 MB, 1 MiB. 1 kB = 1000 B < 1 KiB = 1024 B < 1 MB = 106 B < 1 MiB = 1 048 576 B.

  8. Which value should be given using a decimal (SI) prefix?
    • The capacity of a RAM chip
    • The speed of a broadband connection
    • The size of an image file
    • The size of a cache
    Show answer

    The speed of a broadband connection. Transmission speeds use decimal units; capacities and file sizes use binary units.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.