Published by Patrick Mutisya · 14 days ago
Show understanding of binary magnitudes and the difference between binary prefixes and decimal prefixes.
In digital systems the basic unit of information is the bit. Groups of bits are combined to form larger units:
Higher magnitudes follow the same pattern, using powers of 2 for binary prefixes and powers of 10 for 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) | Symbol | Value (bits) | Value (bytes) | Prefix (Decimal) | Symbol | Value (bits) | Value (bytes) |
|---|---|---|---|---|---|---|---|
| Kibi | Ki | \$2^{10}=1\,024\$ | \$2^{10}=1\,024\$ | Kilo | k | \$10^{3}=1\,000\$ | \$10^{3}=1\,000\$ |
| Mebi | Mi | \$2^{20}=1\,048\,576\$ | \$2^{20}=1\,048\,576\$ | Mega | M | \$10^{6}=1\,000\,000\$ | \$10^{6}=1\,000\,000\$ |
| Gibi | Gi | \$2^{30}=1\,073\,741\,824\$ | \$2^{30}=1\,073\,741\,824\$ | Giga | G | \$10^{9}=1\,000\,000\,000\$ | \$10^{9}=1\,000\,000\,000\$ |
| Tebi | Ti | \$2^{40}=1\,099\,511\,627\,776\$ | \$2^{40}=1\,099\,511\,627\,776\$ | Tera | T | \$10^{12}=1\,000\,000\,000\,000\$ | \$10^{12}=1\,000\,000\,000\,000\$ |
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}
\$\$
Convert 2 MiB to kilobytes (decimal) and kibibytes (binary).
\$\frac{2\,097\,152}{2^{10}} = \frac{2\,097\,152}{1\,024} = 2\,048\ \text{KiB}\$
\$\frac{2\,097\,152}{10^{3}} = 2\,097.152\ \text{kB}\$