Kilbibobibabyte
Why is a kilobyte sometimes 1000 and sometimes 1024 bytes? And what the heck is a kilobit?
Well, actually that’s quite simple: there is only one correct number of bytes per kilobyte, and that is 1000. Let me explain why.
Computers work with bits and bytes. Every 1 or 0 is called a bit. Eight of those are called a byte. I’ll come back to this later. When computers started to be able to do serious stuff, we needed to express the number of bytes in a short way: you wouldn’t say it’s 577 630 meters from Amsterdam to Berlin, however, you would say it is 577 kilometers. That’s why smart engineers came up with the kilobyte.
Because computers don’t like powers of ten, but do like powers of two, the engineers thought it would be nice to make every kilobyte contain 1024 bytes. Nothing weird so far right? But then storage got bigger.
When expressing a value in the order of billions or even trillions of bytes, you probably want to express that with the gigabyte. One gigabyte = 1 073 741 824 bytes.
Sweet! You’ll get 73 741 824 extra bytes per gigabyte, which is an hefty 73,7 MB! Well nope: the marketing guys found out about the decision the engineers made, and they insisted on using 1000 bytes per kilobyte.
The problem is that by definition the marketing guys are right: as defined by the International Bureau of Weights and Measures, the prefix ‘kilo’ means ‘a thousand times [something]’. This has been introduced in the metric system in 1799.
What we ended up with is a dispute between the engineers, who claim 1024 is the most logical way of measuring, and the marketing people (and pretty much the whole non-technical world at that point) who say 1000 is the correct answer. As a compromise the kibibyte has been introduced. One kibibyte has been defined as 1024 bytes, and one kilobyte now contains 1000 bytes. The official shortcut for kilobyte is kB, and the official shortcut for kibibyte is kiB. Ofcourse these conventions are also applicable for megabytes and gigabytes, which will be respectively mebibytes and gibibytes.
The correct way of writing data, ordered from least to most data per unit, is:
1 megabit = 1 Mb
1 mebibit = 1 Mib
1 megabyte = 1 MB
1 mebibyte = 1 MiB
Why do I mention the megabit? Well, since datatranfer speeds are generally measured in megabits per second for marketing reasons (the number is larger, thus looks better to non-tech people). When your ISP tells you your internet speed is 10 Mb/s, that equals 1.25 MB/s, 9.54 Mib/s and 1.19 MiB/s.
I hope you enjoyed this article at least a bit. (Get it? Admittedly, that is the worst joke in the universe…) If you liked the article, or this last joke, I would really appreciate it if you hit the recommend button.