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).
Binary units
- A bit is a single binary digit, 0 or 1.
- A nibble is 4 bits (one hexadecimal digit).
- A byte (B) is 8 bits.
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) | Value | Decimal (SI) | Value |
|---|---|---|---|
| kibi (Ki) | 210 = 1024 | kilo (k) | 103 = 1000 |
| mebi (Mi) | 220 = 1 048 576 | mega (M) | 106 |
| gibi (Gi) | 230 | giga (G) | 109 |
| tebi (Ti) | 240 | tera (T) | 1012 |
Each binary step is x 1024; each decimal step is x 1000.
Which to use
- Use binary units for storage capacity and file sizes, because memory is addressed in powers of 2: for example a 4 GiB memory, a 2.5 MiB image.
- Use decimal units for transmission speeds, measured in bits per second: for example 100 Mbit/s (100 x 106 bits per second).
- Watch the case: b means bits and B means bytes. A 1 KiB file is 1024 bytes = 8192 bits.
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?
- 3 MiB = 3 x 220 bytes
- = 3145728 bytes
- x 8 = 25165824 bits
Answer: 25165824 bits (3 x 223)
Check yourself
- How many different states can 6 bits represent?
Show answer
64. 26 = 64.
- 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.
- How many bytes are in 5 KiB?
Show answer
5120 bytes. 5 x 1024 = 5120 bytes.
- How many bits are in 2 KiB?
Show answer
16384 bits. 2 x 1024 x 8 = 16384 bits.
- How many MiB are in 3 GiB?
Show answer
3072 MiB. 3 x 1024 = 3072 MiB.
- 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).
- 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.
- 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.
Sources
Last updated 8 November 2026. Spotted a mistake? Tell us.