Kilobytes vs. Kibibytes

It’s a common occurrence, you buy a new phone or hard drive 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 device 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 the 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 (km), 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. Which is to say, they process and store information using 0s and 1s, aka bits. As a result, it is convenient to measure information using powers of 2. This clashes with the SI system which measures units in powers of 10.

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 and extended to 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 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:

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 average 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…

Relevant xkcd




Interested in Machine Learning, Math, Quantum Computing, Philosophy, etc. My projects/notes are on

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Kotlin Multiplatform Mobile: The Definitive Cross-platform Bridge

Onboarding developers to Golem via Gitcoin

Playing with Haskell

How to wrap your imperative brain around functional reactive programming in RxJava

Why You Shouldn’t Day Trade

5 Numpy functions you must know.

Tornjak Open Source Project (Under CNCF — SPIFEE/ SPIRE)

Tornjak Logo

Creating Elastic Search Cluster (EC2, cloud-aws Plugin)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ozaner Hansha

Ozaner Hansha

Interested in Machine Learning, Math, Quantum Computing, Philosophy, etc. My projects/notes are on

More from Medium

What are the different translators — Assembler, Compiler, Interpreter

What are the different translators — Assembler, Compiler, Interpreter | TechcyPro

Variables in the programming languages

All About Oop in C++(blog #01)

What is a Class? What is an object? What is an instance?