views:

1458

answers:

27

For decades, in the field of computing (except disk manufacturers), a KB (kilobyte) was understood to mean 1024 bytes. In the past few years, there has been a movement to use KiB ("kibibyte") to mean 1024 bytes, and change the meaning of kilobyte to be 1000 bytes, dooming us to many more years of confusion. On the other hand, the movement seems to be confined to Gnome, and some overzealous wikipedia editing.

Will you be converting your programs to use KiB? If you have ever displayed a filesize in KB, did you divide by 1000 or 1024?

+74  A: 

KB is 1024 bytes, damnit.

Cody Brocious
KB was 1024 bytes :-(
Cristian Ciupitu
Just like a kilogram is 1024 grams?
John Millikin
It would have been 1024 grams if everyone had been using 1024 for the last 20 years, so yes
Orion Edwards
What about if a small group of scientists studying wood decided that 1kg = 1000g? Should that become standard practice? Of course not. Lazy comp-sci students have been using 1024-byte units, but that's no reason to force users to deal with the issue.
John Millikin
Using 1024 makes sense whatever way you look at it. Calling it a kilobyte is confusing. Kibibyte just sounds like dogfood to me though.
Matthew Scharley
KB has been 1024 for so long that it is ridiculous to start introducing new measurements now. Long live KB1024!
Scott Alan Miller
But when you start talking charging by the Gig or the Terra or even the Peta your users won't care if they get a few extra bytes for free.
David McEwing
kilo is a SI prefix assigned to 10^3. even if we don't like it, a kilobyte _is_ 1000 bytes. get over it please :)
Stefano Borini
Jack Bauer, get out of this body!
Pascal Thivent
I upvoted this answer, and Millikin's comment
Ziplin
Standards exist for a reason - KiB is not ambiguous, but KB is - therefore KiB is preferred to be used when talking about 1024 bytes
Robert
+13  A: 

There are 2 ways to think about this:

  1. Use what the operating system you're running on uses. That way users have a consistent experience.

  2. Use what is correct.

If you use KiB always though there will be no confusion. If you use KB there will be confusion. So if you chose option #2 then you're better off actually using 1024 and using the KiB suffix. Working with powers of 2 is more efficient anyway.

It's up to you but my rule of thumb would be that if you have a technical audience, then use KiB and avoid all confusion. If you have a large user base of non technical users, then use what your operating system uses. By the way Windows uses KB to mean 1024 bytes.

Brian R. Bondy
+4  A: 

I've always displayed file size in 1000-byte Kilobytes. It hardly ever matters to the people who can't tell the difference, and often relieves confusion when they see the actual number. 65323 bytes = 65Kb when rounded, and the "normal" people like that.

I probably won't ever display "KiB", since that's never what my customers want.

The arrogance of deciding not to follow the standard created by more than just the computer community (see... it isn't "new" that Kilo actually means 1000) is staggering.

Bill James
So to ease "confusion" do you also modify how memory is displayed? Oh wait, memory isn't measured the same way. So do you use a double standard in your calculations or in your desire for "accuracy"? No matter what some consumer is going to be confused. That's a poor argument at this stage.
Scott Alan Miller
I disagree. Memory isn't something my customers are interested in, for my web app development. File size is mainly used as a guideline for uploads, etc. But yes, if I did have to display memory, I'd just round to the 1000, and they'd like it that way.
Bill James
+1  A: 

I have honestly never heard of this & I doubt it's going to gain much traction in mainstream usage. I can't imagine why I would want to start doing this. The current definition of kilobyte is accurate & sufficient. I would much rather see hard drive manufacturers start using accurate terminology rather than further dumb-down technical terminology. Why can't manufacturers either build drives that are exactly xGB in size or simply say what they really are?

Glenn Slaven
As much as I support the continued use of KB and think that the kibi system is abhorrent, the actual issue is that it is NOT accurate. Technically a kilobyte would be based on 1000 not on 1024. But de facto usage over time confused everyone until 1024 is by far the more common usage.
Scott Alan Miller
In base 10 counting. But this isn't base 10, it's base 2, as Pi said, Binary units for binary machines.
Glenn Slaven
+1  A: 

Drivemaker/denary Kilobytes can burn in hell. Binary units for binary machines.

Pi
So if you wrote a mapping application, you'd abbreviate 131,072 meters as "128 km", right? Binary units for binary machines.
endolith
A: 

If our users accept it, our apps will too. Until then, I feel no need to force a confusing change.

"Tech support."
"Yeah. What the heck is a kibbi-bite?"

Michael Petrotta
And while we're at it, let's define a metre to be exactly 3 feet.
TraumaPony
"Yeah. What the heck is a gigga-bite?"
endolith
A: 

Other than rants about how the terminology needs to change, I have never heard those expressions used. It is not going to catch on.

Jeffrey L Whitledge
A: 

What's next? Mibibyte? Gibibyte? The 2.4% difference in the numbers does amount to something when you're talking about billing based on storage, transfer, etc.

Russell Myers
Mebibyte and Gibibyte are indeed correct. http://en.wikipedia.org/wiki/Mebibytehttp://en.wikipedia.org/wiki/Gibibyte
Matt Hamilton
Not to mention hard drives. Personally, I always felt ripped off whenever I plug a new hard drive in. I paid for 200GB damnit, where's my space? I'd consider it false advertising if it weren't so rampant. I've even seen shops blame the discrepancy on system files.
Matthew Scharley
It's not just 2.4%. When you get to a gigabyte, 1.024^3 ~= 1.074, so that's a 7.4% difference.
Mark Baker
+7  A: 

It's not changing the meaning of "kilobyte". Kilo means 1000. Some people were using it incorrectly to refer to units of 1024 bytes.

I never display file sizes in kibibytes, because users don't care about 1000 vs 1024. Instead, I always use "XXX KB/MB/GB", where XXX is the number of bytes divided by 1 thousand / 1 million / etc.

John Millikin
Unfortunately this means that your users will be confused, as they expect things to be displayed in bytes / 1024, because this is what windows has done forever. As right as you may technically be, you're still wrong
Orion Edwards
Users expect the number to match what's on the box. Currently, OSes displaying using the wrong (kibibyte) units are confusing the hell out of users -- witness how many people think there's some vast conspiracy of HDD builders.
John Millikin
Actually most users wouldn't know the difference between a KB or a MB
Vincent McNabb
@Vincent: a surprising number do, if only because they've noticed that files labelled "MB" take longer to download than "KB" files.
John Millikin
How long until we have file sizes labeled "small" "large" "very large"? Outlook email already does this when you sort by size.
Steve Hanov
I take it you don't know metric very well then. Kilo is k, not K. So a kilobyte in metric would be kB.
tloach
A: 

I'm still going by measurements of 210*n until computers are based on decimal...

Jimmy
Computers were originally based on decimal, actually. http://en.wikipedia.org/wiki/Decimal_computer
endolith
+24  A: 

Since I spent a few years learning to be a mechanical engineer before switching majors, I have to admit that "kilo" always means 10^3 to me. From that standpoint, KiB makes sense. However, try saying "kibibyte" outloud a few times, and think about how dumb you sound.

Therefore, kilogram is 1000 grams, kilobyte is 1024 bytes.

Addendum: In addition, I agree with those who have been saying that we shouldn't change what is already established if it works. 1024 is simply a nicer number in binary. Also, "kibibyte" still sounds like something a dog eats.

Kederaji
Or just use kilobytes, and kibibytes only when needed (AKA almost never)
John Millikin
I highly agree, Kederaji.
The Wicked Flea
Not sure I agree with your logic but I agree with your answer :)Who thought kibi was okay to use? Seriously.Are they claiming that 1024 meters is a kibimeter now too?
Scott Alan Miller
I sound just as dumb saying "kibibye" as i do saying "kilobyte"... Which is not so say i sound dumb!
RCIX
+1  A: 

In every other field, kilo- (10^3) is represented by a lower-case 'k', e.g. kg, km, etc. I think it's accepted that the upper-case 'KB' represents 2^10 bytes, and pronounced 'kilobytes'. When we're talking about bytes, we know we're talking powers of 2.

cgull
unfortunately M, G, P and T don't follow those rules. Also, my ISP claims megabit, and they don't mean 1024, they mean 1000. Worse yet is the ISP is measuring bits and not bytes
Robert Paulson
Storage is measured in powers of two, and transmission in powers of 10.
Just Some Guy
+9  A: 

Areas of speciality have always used terms in ways that are understood by that specialisation. For example, a mechanical engineer building a bridge uses the term "stress" to mean something completely different from, say, a lawyer who finds out his star witness has been lying on the first day in court. Should we mandate that the engineer use the same definition for "stress" as the lawyer just because that definition is more widely used? If we do, I'm not driving across that bridge!

Kilobytes = 1024 bytes. Its an industry accepted specialisation of the term.

Chris Latta
Now if we can just get the hard drive manufacturers to agree to that!
tloach
And the metric system!
TraumaPony
So are hard drive manufacturers an industry sub-specialty, who go back to the other, non-computing usage of "kilo"? Where does it end? Does each sub-specialty in computing get to define its own prefixes? What about things that cross boundaries between specialties? The first paragraph of your comment is insightful, but it doesn't lead to a simple answer in this case!
Ken
+18  A: 

I did this once before in an app. While internally it used kibbi's and mebbi's (KiB, MiB, etc), it would still display in what users (in this case IT folks) were used to. The underlying field was just a long that was in bytes IIRC.

It was forward compatible, and would at least allow you to enter 4 GB as well as 4GiB. It also understood shorthand entry like 4.5G and properly rounded back to the real number of bytes - not forcing poor user to have to enter it that way and prevent their mistakes. Updating to use IEC notation is 1 line of code.


kilo's are 1000 and 98% of the world uses metric. We need to get over it already.

I see a lot of anger in many of these responses which baffles me. SI prefixes are SI prefixes, and programmers have no right to alter them for no better reason than convenience and custom. It's odd that those in Computer Science, a highly technical field, are the one's clamoring to go back to the days of cubits furlongs and rods. wtf?

We all know what we mean, but sticking to custom alienates and confuses users. Just because in the early pioneer days some guys, when talking about computer memory, decided to reuse SI notation doesn't mean they were correct to do so.

Robert Paulson
This can't be upvoted enough.
Dan Moulding
qstarin
+21  A: 
wai
+1 oh xkcd, what with your raptors and such
brian_d
A: 

Kilo means 10^3 when you're working in the decimal number system.

Kilo means 2^10 when you're working in the binary number system.

I mean, just look at it... they're both quite arbitrary. It seems to me that anything else is equally arbitrary - so we have 40-year entrenched arbitrary versus brand-new arbitrary. Which should win? For now, I vote for the entrenched method, simply because it will cause less total confusion.

At some point our technology is bound to change - think quantum/genetic computers - that point will be a good opportunity to sanitize our measuring system.

Also, some users will always be confused - should we remove confusion for them at the risk of confusing the community that makes it all happen (us and the hardware guys)? I think not.

Johan
Feel free to make up any terminilogy you want, but k / kilo is the SI prefix for 10^3. I wouldn't say the metric system is arbitrary either.
Robert Paulson
I don't work in the binary number system, even if my computer does
Mark Baker
The metric system is a hell of a lot older than 40 years.
endolith
+5  A: 

I've worked in the storage industry for a decade. Arguments over the size of a TB can vary the size of a solution by 10%. In short: programmers and the storage industry use different measurements. Neither are right all the time.

The Storage Networking Industry Association (SNIA) dictionary defines kilobyte as:

Kilobyte (KB)

[General] 1,000 (10^3) bytes.

The SNIA uses the 10^3 convention commonly found in storage and data transfer-related literature rather than the 1,024 (2^10) convention common in computer system random access memory and software literature.

My rule of thumb is:

  • Measure memory, files, file systems, and data on a network in 1024^n byte blocks.
  • Measure raw disk space — and only raw disk space — in 1000^n byte blocks.
  • Tell the customer which unit you're using. Repeat yourself often.

By and large, that keeps me out of trouble.

Garth T Kidd
A: 

I tried to start using these terms when teaching my students, but I've sort of given up now.

I've taught an introductory computer course ("and this is a disk drive") a few times, and it can be confusing for the students that the prefixes mean different things in different contexts. Kilo means 1024 when you have a kilobyte or a kilobit of data, except if you store it on disk when it is 1000, and if you send a kilobit per second over a network then it is 1000, and a kilohertz is of course 1000 too. And one kilometer of fiber cable is 1000 meters! But it turns out that it really isn't that much of a problem. The engineering and computer science students need to know the difference, and they will get used to it anyway. When I meet them again in database courses or in the compiler course, there is never any confusion about the different kinds of kilos, megas and teras. And students from other areas (media design and so on) don't really care.

And after I did an informal poll among the other computer science people in my corridor at the university, and found out that most of them had never heard of these new prefixes, I definitely gave up.

Thomas Padron-McCarthy
A: 

No. 1024 bytes is a kilobyte, regardless of whether that makes sense.

The usage of the "kilo-" prefix for units of 1024 bytes back in the day was probably a mistake. But it's now the standard. Trying to change it now only adds to the confusion.

We don't deal with the world as it should be; we deal with the world as it is.

Will Wagner
The great thing about standards is that there are so many to choose from.
Robert Paulson
A: 

A KB is 1024 bytes A kB is 1000 bytes unfortunately spelled out is ambiguous. I always use 1024.

Knuth refers to MB as KKBytes or kkBytes to differentiate between 1024*1024 and 1000*1000

Dan Hewett
A: 

I never use 1000. I think of it as: A binary Kilo is 1024.

A millibyte is 1/1024 bytes.

Osama ALASSIRY
Millibyte! That's great. I guess that would be 1/128 of a bit. I can see how that might be useful: "With Comcast, I'm getting 10 mB/s."
Jeffrey L Whitledge
A: 

Technically KiB is correct, but I have seen it only in a few applications (mainly linux console apps). Users are either used to work with 1024 for both KB and KiB (IT people) or they don't really care and will think that "KiB" is misspelled (non-IT people).

However: I have been used to work with "Kilobytes = 1024 bytes" for over 20 years now and even though I know that it is scientifically wrong will go on using it.

If you need to provide KiB to allow your soul to rest, make it available as an option, but don't confuse poor users with yet another definition - especially if they work with an OS, that uses the non-scientific approach and defines KB as 1024.

(BTW: Kibibytes always reminds me of Tinky Winky and his friends... ;) )

BlaM
Using "k-" as if it meant 1024, when it means 1000 everywhere else, is what confuses users. "Why can't I fit 4.4 GB of data on my 4.7 GB DVD??" They aren't confused when you use the correct units. That's exactly why the correct units exist.
endolith
I don't think so, because "normal users" don't know the difference between KiB and KB.
BlaM
+3  A: 

I use KiB.

Do you really want to hurt everyone by refusing to use well-established standards just like IE?

Omer van Kloeten
+1  A: 

Only if the situation called for it. In almost all cases, 1,000-based units are more appropriate.

The only exceptions I know of are memory, since it naturally comes in multiples of a power of two, and CD size, since it's measured in multiples of 220 bytes by the manufacturers. Everything else, including hard drives, DVDs, flash drives, bandwidths, processor speeds, memory buses, etc. is currently measured in 1000s, and file sizes should be, too. (Or, at least, me and Steve Jobs think so. Windows will probably continue measuring file sizes in 1024s for years...)

To avoid confusing the user, use k- = 1,000, and Ki- = 1,024.

The sloppy usage of "k" to mean 1024 is an unholy abomination that should be killed with fire.

endolith
+2  A: 

One program I'm working on uses "KiB" by default, but has a user pereference as to which unit of measurement to use (1024 B in a KiB, 1024 B in a KB, or 1000 B in a KB).

MiffTheFox
A: 

For me, this is a bit like the 'hacker' arguments we had, back in the day.

Depending on how old and stubborn you are, 'hacker' may mean a different thing to you. For a while in the media (and probably still today, partly) people consider hacking to be the act of breaking into machines illegally. However, in the industry now, the feeling people get is that it is someone who enjoys tinkering with things.

For a while the security community wasn't sure if this would take off, and we actually tried to use 'cracker' to refer to the bad guys. I don't think cracker has really taken off like we'd like, but we have reclaimed 'hacker' as a legitimate term, to quite a reasonable degree of success.

So to me this is the same: just because the media has tried to consider a KB as 1,000, I will never back down, and always stand up for the rights of the remaining 24 bits.

24bFL

Noon Silk
Downvote me all you like. You will never win. I will never back down.
Noon Silk
A: 

As far as the information being arbitrary you have to realize almost every system we use including BASE TEN is arbitrary. We chose a standard way to count, it didn't have to go that way. Redoing all the calculations we have now in say base 8, 37 or even 100 would be impractical. A language is defined by those who speak it, not the dictionary(dialects). Everyone is going to have their own opinion and no set standard will (I think) make everyone happy. I count my KB as 1024 bytes, you count yours as you please. So long as you can understand my dialect and I am clear on what I mean does it really matter? I think it was lack of clarity with regards to HD sizes that spawned a lot of problems (lawsuits), those are now solved for technical users, even if not for everyone else (lawsuits leading to more clarity on the packaging).

Patrick