1 KB = 1024 Bytes? No, 1 KB = 1000 Bytes!

I read up on the history of the ancient convention that 1024 Bytes are called 1 Kilobyte. The problem with the convention is that it’s totally unintuitive unless you know it.

Unfortunately, Microsoft decided to use the following conventions and now the whole world uses it:

  • 1 KB = 1024 Bytes
  • 1 MB = 1024 * 1024 Bytes
  • 1 GB = 1024 * 1024 * 1024 Bytes.

Basically, that is a mish-mash of the ancient 70s convention of using kB for 1000 Bytes and KB for 1024 Bytes, and an abuse of the SI definitions of M and G prefixes. Actually, there is no mB or gB convention, although that would have been logic in the original convention. This is due to the fact that in the 70s – the age of large and expensive computers -, nobody believed that mass storage would actually be achievable at all.

Just assume you never used a computer, ancient UNIX tools or listened to a computer science lecture, or were taught anything about computers. Wouldn’t you expect that

  • 1 KB = 1000 Bytes
  • 1 MB = 1000 * 1000 Bytes
  • 1 GB = 1000 * 1000 * 1000 Bytes?

I filed a bug report against glib, with an historical analysis of the usage of all conventions and formalized nomenclatures in existence (slightly wrong) demanding that g_format_size_for_display() uses the latter conventions. This actually matches IEC recommendations.

One important side-effect of the conventions are:

  • K=1000: Memory sticks and main memory cells are made in powers-of-two – because the address line uses binary logic (i.e. powers-of-two). Historically, their size is advertized with K=1024 to get nice, non-fractional values. Below the 1 GB limit, they were probably advertized with kB rather than KB – but that shouldn’t be relevant anymore. With K=1000, on your computer screen memory (and memory sticks) shows up LARGER than advertized.
  • K=1024: Hard disks do not have such cell architectures, and they are advertized with K=1000. It was some kind of marketing trick in the very beginning, making the disk look larger than you expect, when you set K=1024 as old-fashioned “IT geek”. The effect is that with K=1024, on your computer screen hard disks look SMALLER than advertized.

Compare for yourself: Which of the two statements is positive, psychologically:

  • In contrast to Windows, under Linux my 70 GB hard disk has 70 GB as advertized, and my 1 GB memory sticks grow to 1,07 GB
  • Like under Windows, under Linux my 70 GB hard disk shrinks to 65,1 GB and my 1 GB memory sticks have 1 GB as advertized

Wouldn’t it also be nice to have a 100 MB file with 100 * 1000 Kilobytes? No more calculator I/O or right-clicking required for estimating the “actual” size in byte units!

I am mostly writing this blog entry to get some feedback from our users, rather than from programmers. Please also mention your background in your blog comments! Further concrete information regarding historic conventions and IEC and SI standards is available in the bug report mentioned above.

Also note that I do NOT demand to use the additional odd KiBi, MiBi, GiBi IEC convention that in fact make the current situation worse by using prefixes nobody knows, still defining Ki = 1024. My guess is that it was just introduced for offering an alternative for traditionalists who probably wanted “some convention with the beloved 1024”. But it is a non-traditional measurement prefix for a traditional concept, which makes it unattractive both for old(-fashioned) traditionalists and young pragmatists.

Update

I removed the possibly intimidating roundhouse kicks against IT community, and somewhat out-of-context IRC log excerpts. Sorry if anybody felt insulted – some certainly did. You can find an interesting collection of opinions and personal backgrounds in the blog comments.

66 thoughts on “1 KB = 1024 Bytes? No, 1 KB = 1000 Bytes!”

  1. Carl, that’s not a very good argument. There’s no reason memorys can be made by the 1.024 kB instead of 1024 B, for those who actually need to calculate these things. Absolutely noone in the “real world”, meaning actual users, should ever be exposed to that level of detail anyway, only those who actively seek it.

    Then again, a subset of the world still insist on having 12 inches to their feet instead of 1000mm=100cm=10dm=1m and all those other legacy measurements. Thankfully, one that is in steep decline. But you could argue that a foot never could be measured in meters, because a foot is never ever that long. I guess. Yay for hating any progress and double yay for the old “it was good enough for mah ol’ pa”…

  2. When I ask my girlfriend, she tells me that she doesn’t understand the size of anything on her computer. Be it Harddisk, Ram (she doesn’t know and doesn’t want to know the difference) or filesize in comparison. So it doesn’t make a difference for the end user. I would suggest to find a way to show people how big their harddisk/free space/files are without using technical terms. I think this should be implemented graphically so it is easy to know what size that thing on your computer is just by comparing it to the other things.

  3. Some want one, some want the other. The only sane solution is to:

    Make it a parameter.

    Unless you’re convinced that this shouldn’t be dealt with as a preference. But remember, even in Germany, screen sizes are measured in inches.

  4. Your totally wrong here why the hell should we change this!? Its Microsoft that should change they showing it WRONG!

    Nobody should even cry about this if Microsoft did it right at the begining!!!

    Now everybody seems its Linux that is doing it wrong!?!?!?

  5. Ah, but…most people (in America anyway) understand feet and inches. Do most understand mebibytes?

    Be careful. The conversation is approaching the “we ought to just abstract _all_ these measurements away — normal people aren’t smart enough to understand this.” 😀

  6. My Debian-using girlfriend answered 1000 straight away, and was confused that there was the possibility that it could ever be anything else…

  7. Just use KiB when it is KiB, KB when it is KB, etc. If it’s common to measure disks in KB, go ahead and display it in KB; label it that way. If it’s common to measure ram in KiB, go ahead and display it in KiB; label it that way. That way, someone not familiar with the convention differences will see on screen what their disk box and memory box says is in it. Someone familiar will see an accurate description of the sizes (it’s 100 KiB, okay; silly, but at least accurate).

    Displaying KiB as KB is as inaccurate as displaying feet as meters.

  8. @Carl van Tonder: It’s always possible to convert between one measurement and another (1 inch = 2.54 centimeters).

  9. Not that it matters all that much with today’s hardware, but keep in mind that using a power of two reduces division to a bitshift, whereas dividing by a power of ten is a much more expensive operation.

  10. +1 for using K=1000

    – It doesn’t matter if memory is physically made in powers of 2. The sizes are always integer so pick any relavant integer display format
    – Your 1GB memory stick never stores 1GB. Overhead due to formatting, perhaps the manufacturer decided to reserve some sections etc.
    – If we change most users are not going to care about/notice the 2.4% (KB) or 4.8% (MB) difference
    – The SI system is used much more widely than in the computer industry. Thus it is much more likely to be recognised correctly by Joe user.
    – It doesn’t greatly matter what convention existing command-line tools use – these aren’t used by the majority of users.

    My background: Used computers since young, electrical engineering degree, been working in the software industry since.

  11. Hi, i am a stundent of information technology (at university) and we had a somewhat lengthy discussion about this in class a while ago.
    In IT the unit “bit” is actually not only for file sizes on disk but for quantities like “entropy” or “self-information”. In this context there is absolutly no dabate that 1k=1000. This means all scientists in the world use k=1000 exclusivly in all their pulbications etc. so it is definitly not a sure way to be inconsistent with _everything_.

    I am a little suprised that nobody mentioned the absolute highlight of this nerverending idocracy: remember those little plasic things called “floppy disk” with an advertised capacity of 1.44MB ? how much bytes are on these?
    a) 1.44 * 1000 * 1000 = 1440000
    or
    b) 1.44 * 1024 * 1024 = 1509949 ?
    well…none of the above: 1.44 is actually the result of using k=1024 and M=1000 so the floppy has a capacity of 1.44 * 1000 * 1024 = 1474560 bytes…totaly logical isn’t it?

    also great:
    how long does it take to copy a 20MB file with a speed of 20MB/s?
    one second? certainly not…tranfer rates _always_ use k=M=1000 file sizes moslty use k=M=1024…so i takes 1.04858 seconds…at least close…

Leave a Reply

Your email address will not be published. Required fields are marked *