Kilobytes vs. Kibibytes

Kilobytes vs. Kibibytes

Why storage sizes are always a little off

Its a common occurrence, you buy a new hard drive or even a new phone marketed at say 128GB. But when you go and check the maximum capacity of your device in the settings, you find that its less than advertised! What gives?

One culprit is the preloaded software that comes on the deceive needed to run it. For phones this comes in the form of the OS, and other firmware. Hard drives also have preloaded software but require much less of it.

But even accounting for this extra space, there is still a discrepancy. For this we can blame difference between a kilobyte (kB) and a kibibyte (kiB).

Before we begin though, let?s first review the standard decimal prefixes we are all familiar with:

Decimal Prefixes

When dealing with very large or very small quantities it is common to append, or rather prepend, one of the SI (metric system) prefixes to whatever unit is being used. For example, the average human weighs 62000g but because that number is cumbersome to use, we usually append kilo- (the SI prefix meaning a thousand) to the gram unit and write 62kg instead.

This system works just fine for all sorts of units of measure like mass (kg), length (kg), energy (kJ), etc. But when it?s applied to units of information, specifically binary ones like bits and bytes, a problem arises?

Binary Prefixes

Historically when computer scientists used the word kilobyte (kB) they didn?t mean 1000 bytes. They meant 1024 bytes. This is because computers operate in binary, i.e. they operate on and store information in powers of two. However, because 2? = 1024 which is almost 1000, the kilo- in kilobyte was close enough for the computer scientists of the era. And so the, slightly misleading, convention was accepted for higher denominations of storage as well, from megabytes (MB) to terabytes (TB).

This all changed around 1998 when the International Electrotechnical Commission (IEC) and other regulatory organizations banded together to create a new set of prefixes to be used for information storage to be used in lieu of the standard SI ones. Enter binary prefixes. By replacing the last two letters at the end of the old prefixes with a -bi, the IEC essentially made a copy of the familiar SI prefixes that matched computer scientists? 2? version:

Image for post

Soon the US National Institute of Standards and Technology (NIST) followed suit and required that the SI prefixes only be used in the decimal sense.

Transitioning from Decimal to Binary

So problem solved, right? Well? no. Most people have never heard of a kibibyte (kiB), mebibyte (MiB), or gibibyte (Gib) and probably never will. Hardware manufacturers know this and, rather than deal with the general consumer?s outdated perception of information storage, opt to just use the closest decimal prefix.

That said, there are a growing number of software and hardware applications that make use of binary prefixes. Who knows, one day we might live in a world where the symbols ?GiB? and ?TiB? are commonplace. But it probably won?t be anytime soon?

Image for postRelevant xkcd


No Responses

Write a response