AQA 7517, section 4.5.3.2
The size of data is measured in bytes, with a prefix to show how large the quantity is. There are two systems of prefix, and they are not the same size.
Decimal prefixes (powers of 10)
These are the familiar SI prefixes. Each step is a factor of 1000.
| Name | Symbol | Power of 10 | Value in bytes |
|---|---|---|---|
| kilobyte | kB | 1 000 | |
| megabyte | MB | 1 000 000 | |
| gigabyte | GB | 1 000 000 000 | |
| terabyte | TB | 1 000 000 000 000 |
For example, .
Binary prefixes (powers of 2)
Computers work in binary, so memory sizes naturally come in powers of 2. Each step is a factor of 1024 ().
| Name | Symbol | Power of 2 | Value in bytes |
|---|---|---|---|
| kibibyte | KiB | 1 024 | |
| mebibyte | MiB | 1 048 576 | |
| gibibyte | GiB | 1 073 741 824 | |
| tebibyte | TiB | 1 099 511 627 776 |
For example, .
The name "kibi" is short for "kilo binary", and the same pattern applies to mebi, gibi and tebi.
Comparing them
| Prefix | Decimal | Binary | Binary is bigger by |
|---|---|---|---|
| kilo / kibi | 1 000 | 1 024 | 2.4% |
| mega / mebi | 1 000 000 | 1 048 576 | 4.9% |
| giga / gibi | 1 073 741 824 | 7.4% | |
| tera / tebi | 1 099 511 627 776 | 10.0% |
The gap grows with each step. Historically, the terms kilobyte, megabyte and so on have often been used when kibibyte, mebibyte and so on were meant, which is a common source of confusion.
Why does it matter?
Storage manufacturers usually use decimal units, while operating systems often show sizes in binary units (and sometimes still call them GB). That's why a new "500 GB" drive appears to have less space:
The drive hasn't lost any space. The two units are just different.
Converting between units
- To go to a smaller unit, multiply (there are more of them).
- To go to a bigger unit, divide.
Example: how many bytes are in ? bytes.
Example: how many kB is ? .
To convert bits to bytes, divide by 8.
Worked example
Task: a photo file is 4 718 592 bytes. Give its size in MiB, and in MB to 2 decimal places.
- In MiB: .
- In MB: (to 2 d.p.).
The same file gives a different number in each system, but the size in bytes is identical.
Exam tip: learn the names, symbols and powers: kibi , mebi , gibi , tebi , and kilo , mega , giga , tera . Check whether the question uses KiB (binary) or kB (decimal) before you calculate.
Check yourself
How many bytes are in 1 KiB, and in 1 kB?
1 KiB is bytes. 1 kB is bytes.
How many bytes are in 2 GiB?
bytes.
Why does a "1 TB" drive show as about 931 GiB in an operating system?
The manufacturer uses decimal units, so 1 TB is bytes. Divided by this is about 931 GiB, which is what the operating system shows when it uses binary units.