Computer ScienceExam code: 0984

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.

UnitSymbolSizeIn bytes
Bitba single 1 or 01/8 byte
Nibble—4 bits1/2 byte
ByteB8 bits1 byte
KibibyteKiB1024 bytes1 024
MebibyteMiB1024 KiB1 048 576
GibibyteGiB1024 MiB1 073 741 824
TebibyteTiB1024 GiB2⁴⁰
PebibytePiB1024 TiB2⁵⁰
ExbibyteEiB1024 PiB2⁶⁰

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.

Build on this topic