EndoMint

McoreD's blog · Opinions are my own.

Say Hi to MiB, GiB and TiB

Computer storage uses two different number systems, and their names are easy to mix up.

The decimal prefixes used in the metric system are powers of 1,000:

  • 1 kB = 1,000 bytes
  • 1 MB = 1,000,000 bytes
  • 1 GB = 1,000,000,000 bytes
  • 1 TB = 1,000,000,000,000 bytes

Binary prefixes are powers of 1,024:

  • 1 KiB = 1,024 bytes
  • 1 MiB = 1,048,576 bytes
  • 1 GiB = 1,073,741,824 bytes
  • 1 TiB = 1,099,511,627,776 bytes

The i in KiB, MiB, GiB and TiB marks the binary prefix. A megabyte and a mebibyte are close in size, but they are not the same. The difference becomes more noticeable at larger units.

When checking a storage figure, look at both the number and the unit. A clear report uses decimal units for decimal quantities and binary units for binary quantities. Also keep b for bits and B for bytes: a network speed in Mb/s is not the same unit as a file size in MB.

The capacity has not vanished. The labels tell you which counting system the software or device is using.

Sources: NIST: The binary prefixes, IEC: Prefixes for binary multiples.