Why a kilobyte is 1000 and not 1024 bytes

wischi@programming.dev to Technology@lemmy.world – 89 points –
zeta.one

I often find myself explaining the same things in real life and online, so I recently started writing technical blog posts.

This one is about why it was a mistake to call 1024 bytes a kilobyte. It's about a 20min read so thank you very much in advance if you find the time to read it.

Feedback is very much welcome. Thank you.

81

You are viewing a single comment

This whole mess regularly frustrates me... why the units can't be used consistently?!

The other peeve of mine with this debacle is that drive capacities using SI units do not use the full available address space (since it's binary). Is the difference between 250GB and 256GiB really used effectively for wear-levelling (which only applies to SSDs) or spare sectors?

Huh? What does how a drive size is measured affect the available address space used at all? Drives are broken up into blocks, and each block is addressable. This is irrelevant of if you measure it in GB or GiB and does not change the address or block size. Hell, you have have a block size in binary units and the overall capacity in SI units and it does not matter - that is how it is typically done with typical block sizes being 512 bytes, or 4096 (4KiB).

Or have anything to do with ware leveling at all? If you buy a 250GB SSD then you will be able to write 250GB to it - it will have some hidden capacity for ware-leveling, but that could be 10GB, 20GB, 50GB or any number they want. No relation to unit conversions at all.

You know what else is frustrating? Time units. It’s like we’re back in the pre-SI days again. Try to compare the flow rates of two pumps when one is 123 m^3/h and the other is 1800 l/min. The French tried to fix this mess too while they were at it, but somehow we’re still stuck with this archaic mess.

Power of 2 makes more sense to the computer. 1000 makes more sense to people.

Of course. The thing is, though, that if the units had been consistent to begin with, there wouldn't be anywhere near as much confusion. Most people would just accept MiB, GiB, etc. as the units on their storage devices. People already accept weird values for DVDs (~4.37GiB / 4.7GB), so if we had to use SI units then a 256GiB drive could be marketed as a ~275GB drive (obviously with the non-rounded value in the fine print, e.g. "Usable space approx. 274.8GB").

They were consistent until around 2005 (it's an estimate) when drives got large enough where the absolute difference between the two forms became significant. Before that everyone is computing used base 2 prefixes.

I bet OP does too when talking about RAM.

It's not as simple as that. A lot of "computer things" are not exact powers of two. A prominent example would be HDDs.

In terms of storage 1000 and 1024 take the same amount of bytes bits to represent. So from a computer point of view 1024 makes a lot more sense.

It's just a binary Vs decimal thing. 1000 is not nicely represented in binary the same as 1024 isn't in decimal.

Edit: was talking about storing the actual number.