Data Storage and Compression
Data Representation
Every value held on a computer ultimately lives as bits. The units in the table below give names to bigger and bigger collections of bits, which is what file sizes are measured in.
| Unit | Symbol | Size | In bytes |
|---|---|---|---|
| Bit | b | a single 1 or 0 | 1/8 byte |
| Nibble | — | 4 bits | 1/2 byte |
| Byte | B | 8 bits | 1 byte |
| Kibibyte | KiB | 1024 bytes | 1 024 |
| Mebibyte | MiB | 1024 KiB | 1 048 576 |
| Gibibyte | GiB | 1024 MiB | 1 073 741 824 |
| Tebibyte | TiB | 1024 GiB | 2⁴⁰ |
| Pebibyte | PiB | 1024 TiB | 2⁵⁰ |
| Exbibyte | EiB | 1024 PiB | 2⁶⁰ |
The Cambridge 0984/0478 syllabus uses the binary convention: each prefix is a factor of 1024 (= 2¹⁰), and the units are named kibibyte (KiB), mebibyte (MiB), gibibyte (GiB) and so on. The syllabus is explicit that calculations must use 1024 and not 1000, so this is the convention to apply in every exam answer.
The amount of the previous denomination is always 1024: there are 1024 bytes in a kibibyte, 1024 kibibytes in a mebibyte, 1024 mebibytes in a gibibyte, and so on up the table.
Common exam question
Recalling the units of data storage
Question: State how many bits make a byte or how many kibibytes make a mebibyte, name the smallest unit of data, or tick the largest unit (or the one that is not a unit) in a list (1 mark each).
Asked in 4 of the 17 papers, always as one-mark recall. The credited answers are 8 bits in a byte, 1024 kibibytes in a mebibyte (and 1024 of each unit in the next one up, never 1000), and the bit as the smallest unit. A nibble is 4 bits, so two bytes hold 4 nibbles.
For a tick-box list, run up the table: kibibyte, mebibyte, gibibyte, tebibyte, pebibyte, exbibyte, so the largest of tebibyte, pebibyte, mebibyte and gibibyte is the pebibyte. The option that is not a unit is the made-up word (one paper offered "bot" alongside bit, nibble and byte).
The decimal (SI) prefixes you will also see
Storage manufacturers commonly label disks using the older SI (decimal) prefixes, where each prefix is a factor of 1000: kilobyte (kB), megabyte (MB), gigabyte (GB), terabyte (TB). This is why a disk sold as a "1 TB hard drive" holds 1 000 000 000 000 bytes. These prefixes are useful to recognise, but the exam uses the 1024-based binary units above.
For exam questions, read the question carefully and follow the syllabus rule: calculations use 1024, not 1000. Give your answer in whatever unit the question specifies.