Show understanding of binary magnitudes and the difference between binary prefixes and decimal prefixes

Published by Patrick Mutisya · 14 days ago

Cambridge A-Level Computer Science 9618 – Data Representation

1.1 Data Representation

Objective

Show understanding of binary magnitudes and the difference between binary prefixes and decimal prefixes.

Binary Magnitudes

In digital systems the basic unit of information is the bit. Groups of bits are combined to form larger units:

  • 1 byte = 8 bits
  • 1 kilobit (kb) = \$10^{3}\$ bits = 1 000 bits
  • 1 kilobyte (kB) = \$10^{3}\$ bytes = 1 000 bytes
  • 1 kibibit (Kib) = \$2^{10}\$ bits = 1 024 bits
  • 1 kibibyte (KiB) = \$2^{10}\$ bytes = 1 024 bytes

Higher magnitudes follow the same pattern, using powers of 2 for binary prefixes and powers of 10 for decimal prefixes.

Binary vs Decimal Prefixes

Binary prefixes (kibi, mebi, gibi, etc.) are defined by powers of two, whereas decimal prefixes (kilo, mega, giga, etc.) are defined by powers of ten. This distinction is important when interpreting storage capacities and data rates.

Prefix (Binary)SymbolValue (bits)Value (bytes)Prefix (Decimal)SymbolValue (bits)Value (bytes)
KibiKi\$2^{10}=1\,024\$\$2^{10}=1\,024\$Kilok\$10^{3}=1\,000\$\$10^{3}=1\,000\$
MebiMi\$2^{20}=1\,048\,576\$\$2^{20}=1\,048\,576\$MegaM\$10^{6}=1\,000\,000\$\$10^{6}=1\,000\,000\$
GibiGi\$2^{30}=1\,073\,741\,824\$\$2^{30}=1\,073\,741\,824\$GigaG\$10^{9}=1\,000\,000\,000\$\$10^{9}=1\,000\,000\,000\$
TebiTi\$2^{40}=1\,099\,511\,627\,776\$\$2^{40}=1\,099\,511\,627\,776\$TeraT\$10^{12}=1\,000\,000\,000\,000\$\$10^{12}=1\,000\,000\,000\,000\$

Why the Distinction Matters

Manufacturers of storage devices (e.g., hard drives, SSDs) usually quote capacities using decimal prefixes, while operating systems often report sizes using binary prefixes. This can lead to apparent discrepancies. For example:

\$\$

\text{1 GiB} = 2^{30}\ \text{bytes} = 1\,073\,741\,824\ \text{bytes} \\

\text{1 GB} = 10^{9}\ \text{bytes} = 1\,000\,000\,000\ \text{bytes}

\$\$

If a drive is advertised as 500 GB, the operating system may display roughly 465 GiB because:

\$\$

500\,\text{GB} = 500 \times 10^{9}\ \text{bytes} \approx \frac{500 \times 10^{9}}{2^{30}}\ \text{GiB} \approx 465\ \text{GiB}

\$\$

Conversion Example

Convert 2 MiB to kilobytes (decimal) and kibibytes (binary).

  1. Start with the binary value: \$2\ \text{MiB} = 2 \times 2^{20}\ \text{bytes} = 2\,097\,152\ \text{bytes}\$.
  2. To obtain kibibytes (binary): divide by \$2^{10}\$.

    \$\frac{2\,097\,152}{2^{10}} = \frac{2\,097\,152}{1\,024} = 2\,048\ \text{KiB}\$

  3. To obtain kilobytes (decimal): divide by \$10^{3}\$.

    \$\frac{2\,097\,152}{10^{3}} = 2\,097.152\ \text{kB}\$

Key Points to Remember

  • Binary prefixes are based on powers of 2; decimal prefixes are based on powers of 10.
  • 1 KiB = 1 024 bytes, whereas 1 kB = 1 000 bytes.
  • Always check which convention is being used when comparing storage capacities or data rates.

Suggested diagram: A side‑by‑side bar chart comparing binary and decimal prefixes for bits and bytes up to the tera‑ level.