What is the origin of K = 1024?

73

16

Why does the discrepancy in the number of bytes in a kilobyte exist? In some places I've seen the number 1024 (210) while in others it's 1000 (and the difference gets increasingly large with M, G, T, etc.).

This is not a discussion about whether it should be 1024 or 1000 (though you can discuss it in the comments) but about where/when this situation originated and/or became widespread.

As far as I know, Linux and hardware manufacturers never use the 1024 variant. That, and hearsay, make me think MS-DOS made this version common, but what are the facts?

Bart van Heukelom

Posted 2011-05-23T11:00:36.317

Reputation: 1 958

Question was closed 2011-05-24T13:34:05.263

bits and bytes are two different things, a kilobit is still 1000 bits, but a kilobyte is 1024 bytes and a byte is 8 bits. the reason for the 1024 is so that everything is still in binary 2^10 = 1024 – Malachi – 2014-10-14T15:00:26.037

23One representation is in binary (2^10, or 1024) while the other is in decimal (10^3 or 1000)... – Trezoid – 2011-05-23T11:04:11.507

5ditto. Plus the fact that 1024 bytes is called a Kibibyte (KiB) and not a Kilobyte (kB -> 1000 bytes). – Isaac Clarke – 2011-05-23T11:29:55.907

13If you are looking for specific people to blame, point towards hard drive manufacturers. It makes their devices look like they have more capacity when it is expressed in decimal MBs, GBs, etc. They've always done this I believe but it hasn't been until fairly recently that the gap between decimal and binary has grown wide enough to matter significantly. – LawrenceC – 2011-05-23T11:52:13.573

23@ultrasawblade: You want to blame HDD manufacturers for being one of the only groups that use the term gigabyte correctly? – paradroid – 2011-05-23T11:57:33.993

13It just always seemed to me to be an understood thing that 1K=1024 with anything computer related before 20GB or so drives became commonplace. This also roughly coincides with the time when many non-technical people started using PCs on a regular basis. Vast amounts of computer literature (technical and nontechnical) from the early 90's and before doesn't mention anything about "decimal" KBs or "kibibytes". – LawrenceC – 2011-05-23T13:38:46.843

1@ultrasawblade: That's because it is a new unit, only defined in 1999. – paradroid – 2011-05-23T14:33:43.047

6Sheesh. Who really calls it a Kibibyte anyway? Have you ever heard anyone call it a Kibibyte in ordinary conversation without someone suppressing laughter? – Robert Harvey – 2011-05-23T15:27:57.920

13@paradroid: gigabyte originally meant 1024 mb (and mb = 1024 kb, etc). It was retconned to mean 1000 because HDD manufactures insisted on using it wrong. Admittedly, this does depend on what you consider "right" since kilo does mean 1000, but within computer science, kilobyte was always 1024 for technical reasons until it was changed in 1999. – James – 2011-05-23T15:40:01.713

7@James: This whole conversation is about how using the SI unit prefixes on binary units was wrong in the first place. – paradroid – 2011-05-23T15:42:45.743

1The government! – Wipqozn – 2011-05-23T16:23:34.310

5@paradroid: byte and bit aren't SI units. Personally I think it's just better and natural to use 1KB = 1024 bytes notation exceptionally for that area. – Grzegorz Szpetkowski – 2011-05-23T16:33:08.477

5@Grzegorz Szpetkowski They're IEC 80000 units and are subject to standard prefix rules! – AndrejaKo – 2011-05-23T17:08:25.310

3Don't you mean, "Who is to be praised for K = 1024"? – Mateen Ulhaq – 2011-05-23T17:52:57.753

2Until your message, I had never seen K = 1000 in a computer context. – None – 2011-05-24T03:27:06.583

1@Ashish So you never bought a hard drive? Sure, they're more about G and T than K or M, but it's only a few zeros more... also, data transfer rates (as in 64kbit/s or 100Mbit/s) are also multiples of 1000. – Daniel Beck – 2011-05-24T08:11:02.817

2The real reason is because memory is addressed in binary. It doesn't matter if you're storing and processing bits, trits, or decimal digits in each address. It's the addressing that creates the power-of-two sizes. @Ashish: Your networking hardware is all measured in 1000s, as are CPU clock rates, memory buses, DVD sizes, etc. – endolith – 2011-06-06T21:24:09.413

1

@ultrasawblade: "It just always seemed to me to be an understood thing that 1K=1024 with anything computer related" Nonsense. See http://en.wikipedia.org/wiki/Kilobyte and http://en.wikipedia.org/wiki/Timeline_of_binary_prefixes for some examples. It's been ambiguous since the beginning of time.

– endolith – 2011-07-24T22:50:38.920

Answers

63

It goes back quite some time, and is detailed here. It looks like you can blame IBM, if anybody.

Having thought about it some more, I would blame the Americans as a whole, for their blatant disregard for the Système international d'unités :P

paradroid

Posted 2011-05-23T11:00:36.317

Reputation: 20 970

31It's always easy to blame the Americans. – Notinlist – 2011-05-23T15:11:23.527

13@Notinlist: It is a joke. – paradroid – 2011-05-23T15:15:40.170

1@paranoid Sorry, I missed it. Make a minor edit so I can revoke the -1. – Notinlist – 2011-05-23T15:18:24.443

5It reminds me an epic scene of the Pulp Fiction movie... The one with the question about the "metric system". :-) – Pierre Watelet – 2011-05-23T15:55:43.013

7@Notinlist It is easy to always blame the Americans. That's why we do it so much. That and the fact that its fun. – Singletoned – 2011-05-23T15:57:27.600

3The 1961 entry there is interesting, in that it mentions "65k" - being the first order of magnitude which can show a clear difference between "k=1024" and "k=1000, rounded", it comes down clearly for the latter. In 1964, on the other hand, everyone is using the binary meanings. – Random832 – 2011-05-23T16:20:08.377

Care to elaborate on the origin a bit more @paranoid? – Ivo Flipse – 2011-05-23T17:36:21.940

@paradroid so you just going to ignore mathematics altogether? Might as well ignore physics too. It's really just manufacturers being lazy. Plus it would look kind of funky to put on a box that says 19.07GB for a 20GB drive. Also you have to look at the fact that the OS will use some of that for file system formatting. – Matt – 2011-05-23T19:33:51.110

2one more thing to blame americans for! is there a list somewhere? – Arjang – 2011-05-23T19:53:02.100

1@Arjang Give Randall Munroe that idea for his next XKCD comic. ;) – Mateen Ulhaq – 2011-05-23T21:32:45.893

This answer makes me feel very, very old. – WOPR – 2011-05-24T10:06:26.837

I'm an American and I strongly prefer the metric system, but this seems to be one of the few cases where not using base 10 makes perfect sense IMHO. – Gordon Gustafson – 2011-07-22T21:53:46.627

2@CrazyJugglerDrummer: The point is that it is a misuse of the decimal prefixes, and it causes confusion when the same prefix is used for both systems. That is why new prefixes have been defined for the binary units. – paradroid – 2011-07-22T22:32:51.490

27

All computing was low-level at the beginning. And at low level programming the number "1000" is totally useless and they needed prefixes for larger amounts so they reused the SI ones. Everyone knew it in the field, there was no confusion. It served well for 30 years or who knows.

It's not because they were Americans so they needed to break SI at all costs. :-)

There is no programmer who I know and says kibibyte. They say kilobyte and they mean 1024 bytes. Algorithms are full of the powers of 2. Even today, "1000" is a really useless number between programmers.

Saying kibi and mibi is just too funny and draws attention from the subject. We happily give it away to the telecommunication and disk storage sectors :-). And I will write kibibytes on user interfaces where non-programmers may read it.

Notinlist

Posted 2011-05-23T11:00:36.317

Reputation: 466

1000 was never useless, frequency was always written in kHz, MHz, GHz or similar. Because of that, transfer rates make much more sense in KB/s, MB/s and GB/s and not in KiB/s, MiB/s, GiB/s. – 12431234123412341234123 – 2017-07-11T10:18:34.157

@12431234123412341234123 I did not say that it is useless in general. I specifically mentioned programming. Not data transmission. – Notinlist – 2017-07-11T11:15:53.560

@Notinlist Data Transmission is often (not always, DMA can be done in Hardware) programmed. Somebody must write a driver for the Interfaces. – 12431234123412341234123 – 2017-07-11T12:41:32.150

3It's even funnier to say when talking about bits - "mibibit" – James – 2011-05-23T15:52:41.423

3I think KiB, etc is supposed to be pronounced kilobinarybyte, etc and not kibibyte. – Lie Ryan – 2011-05-23T15:52:58.723

3

@Lie Ryan, using prefixes like "kilobinarybyte" was a proposal that ultimately failed, and had different abbreviations than kibibyte did anyway. See http://en.wikipedia.org/wiki/Binary_prefix

– Ben Lee – 2011-05-23T20:12:03.290

2Of course, it is perfectly acceptable to say "kilobinarybyte" and it is actually more transparent and less silly-sounding than kibibyte, but that usage is not sanctioned by the IEC. – Ben Lee – 2011-05-23T20:14:09.687

3so would it be fair to pronounce km as kilodecimalmeters? – JustJeff – 2011-05-23T21:18:02.480

@Ben Lee: Where was the proposal that failed? Isn't "KiB" an abbreviation for "kilobinary byte" in the IEC standard itself? "Symbol: Ki Origin: kilobinary" http://physics.nist.gov/cuu/Units/binary.html

– endolith – 2011-07-25T21:13:29.220

3

The number 1000 is not "totally useless". "k=1000" has been used in computing since the 1950s. The first computers were actually decimal machines, not binary. Networking speed has always been measured in multiples of 1000. "It served well for 30 years"? Really? Programmers have been complaining about "k=1024" for at least 43 years. http://en.wikipedia.org/wiki/Timeline_of_binary_prefixes

– endolith – 2011-11-09T01:23:47.963

1@endolith For decimal computers: OK. Networking speed (bandwith), storage: OK. Download speed, memory amount, programming: 1024. I'm programming for 24 years now. Sure, I'm alone not a representative sample, but I experienced that 1000 is useless between programmers. Never heard any mate complaining about 1024. – Notinlist – 2011-11-09T09:59:05.463

1

@Notinlist: Right. The only time 1024 makes sense is when working with memory or memory-related sizes in a program. Everything else in computing makes more sense as 1000s, and has been used that way since the 50s. It's not useless. And people have been confused by programmers' sloppy usage for decades: "The fact that 2^10 and 10^3 are almost but not quite equal creates a lot of trivial confusion in the compuing world..." (1968) http://www.deepdyve.com/lp/association-for-computing-machinery/letters-to-the-editor-abbreviations-for-computer-and-memory-sizes-gS8DpMeOcZ

– endolith – 2011-11-09T14:56:02.160

2It's mebi, actually, not mibi. – Todd Lehman – 2013-04-03T02:32:25.280

8

It is correct and makes sense for technical people to use 1024 = 1K in many cases.

For end users it is normally better to say 1000 = 1k because everybody is used to the 10-based number system.

The problem is where to draw the line. Sometimes marketing or advertising people do not really succeed in the "translation" or in adapting technical data and language to end users.

mit

Posted 2011-05-23T11:00:36.317

Reputation: 1 369

13Technical people should know that 1024 bytes is really a Kibibyte (KiB), but know that the term is not known by non-technical people. – paradroid – 2011-05-23T11:20:34.790

8Who says it's correct? Kilo has meant 1000 for centuries, so IMO they should never have used it for 1024. – Bart van Heukelom – 2011-05-23T12:40:18.067

2It makes the numbers fit better, when you're dealing with amounts of storage, to use powers of 2, not powers of 10. Otherwise, Commodore would have been advertising the C64 with 62.5KB of RAM, and customers would have been asking why it didn't have 64 - then someone would have to point out that you'd need to add a whole RAM chip just to hold that extra 1.5KB... – njd – 2011-05-23T13:37:01.757

20The byte is not an SI unit; KB means "kilobel" (granted, a unit you'd never want to use unless you were describing the sound, if any, produced by the Big Bang.) – Wooble – 2011-05-23T13:43:27.657

1@njd: I thought the C64 had 65 536 bytes of RAM? ;) – Macke – 2011-05-23T14:04:50.050

10@njd: The C64 has 65536 bytes of RAM. By convention, memory size is specified in kibiBytes, data transfer rates in kilobits, and mass storage in whatever-the-manufacturers-think-of-now-Bytes. Harddrives use T, G, M and k on the label, Windows reports the size in Ti, Gi, Mi and ki. And those 1.44MB floppys? Those are neither 1.44MB nor 1.44MiB, they are 1.44 kilokibibytes. That's 1440kiB or 1'474'560 bytes. – Third – 2011-05-23T14:19:59.587

5The kiB, etc variants are fairly new, though. I don't think they were in use when this problem arose, certainly - I was under the impression they were made exactly to resolve it! – Shinrai – 2011-05-23T15:17:05.817

Gah. Had my head on upside-down there for a while. Of course I meant 64Kib == 65.536 * 1000 bytes. And Commodore would have had to call it the C65.536. – njd – 2011-05-24T08:54:09.270

1@Wooble: The byte may not be an SI unit, but SI explicitly forbids using kilo- to mean 1024. "These SI prefixes refer strictly to powers of 10. They should not be used to indicate powers of 2 (for example, one kilobit represents 1000 bits and not 1024 bits)." – endolith – 2011-07-25T21:35:02.227

@paradroid: non-technical people don't know about kilo- meaning 1024, either. :) It means 1000 in every context they're used to. – endolith – 2011-07-25T21:37:04.427

3

Blame semiconductor manufacturers (they provide us with binary hardware only)[1]

Better yet: blame logic itself (binary logic is just the most elementary logic).

Better yet: who shall we blame for the wretched decimal system?

It has far more flaws than the binary system. It was based cough on the average number of fingers in the human species cough

Oooo...

[1] I want my quantum three-qubit computer!!! Now!

sehe

Posted 2011-05-23T11:00:36.317

Reputation: 1 796

29I think you'll find the average number of fingers is less than 10 </pedant> – Rory Alsop – 2011-05-23T16:55:24.903

1@Rory: ^ that was a good laugh – user541686 – 2011-05-23T19:22:47.230

2@Rory: "fewer" </pedant>. Or is it? Hang on a minute, I aargh... – outsideblasts – 2011-05-23T20:07:32.077

1

1024 is not to be blamed it is a very good thing indeed, as it is the reason computer (digital) can be as fast and as efficient as they are today. Because the computer only use 2 value (0,1) it takes out the hardship and complexity (inaccuracy) of anolog system out of the equation.

It would be more complicated if we said a kilobyte is 1000 bits because 2 to what power is 1000? so even 1 kilobyte would be inaccurate because it will have floating points or an approximation.

But i largely blame marketing for selling a 8 gigabytes* and adding this in the small print

* 1 gigabyte is 1,000,000,000 bytes. 

it is a shame really, that is the same thing with connection speed, your ISP will say 1.5Mbps instead of telling you ~150 kiloBytes. it's just very misleading

Ibu

Posted 2011-05-23T11:00:36.317

Reputation: 160

3In saying how large a file of 15682 bits is, or how fast such a file can be transferred over a network, powers of 2 play no role. And that's the context where the most confusion is. – Bart van Heukelom – 2011-05-23T18:59:18.970

2Ultimately the file is stored in memory pages, which are aligned to binary power boundaries. When sending over TCP, the window size in which packets are sent is multiples of powers of two. When the file is stored on the hard drive, it's stored in blocks of powers of two. I understand what you're saying, but kilobyte = 1024 (or at least multiples of powers of two) is ingrained in computing too much. – FryGuy – 2011-05-23T22:10:26.540

1to be fair, networking has always used bits as their base. – Synetech – 2011-05-24T03:55:19.163

1The first 5.25" floppy held 109,375 bytes and was advertised as "109.4 Kbytes". I guess they did this for evil marketing reasons, too? You think it would be more logical to write it as "106.8 KB"? And tape drives and processor speeds and modem speeds are all measured in decimal to deceive us? Please. – endolith – 2011-07-25T21:21:34.843

@endolith, there is a big difference between 1,000,000,000 bytes and 1GB. you are giving a 25bytes example. i think you completely misunderstood my point. – Ibu – 2011-07-25T22:27:55.753

1@Ibu: the difference between 1,000,000,000 bytes and 1GB is 0. Indeed, why would floppy manufacturers maliciously inflate their numbers when the difference is so small? They wouldn't. They used 1000s because it's logical, obvious, and correct, not because they're part of a conspiracy to defraud customers. Hard drive manufacturers have been measuring in 1000s since the MB years, too, for the same reason. – endolith – 2011-07-25T23:14:04.557

1GB is 1,073,741,824 bytes

– Ibu – 2011-07-25T23:42:51.230

and what are you talking about when you say conspiracy and such. yes 1billion bytes sounds better than the decimal, get it over with already, there are so much more fun questions in here already, find a new thread, you are not contributing to anything in this one @endolith – Ibu – 2011-07-25T23:49:08.833

@Ibu: 1 GB is 1,000,000,000 bytes. You said you "largely blame marketing"; that hard drive manufacturers are maliciously measuring using SI units in order to inflate their drive sizes and defraud customers. They've even been sued over this. But this is a nonsense conspiracy theory. They were measuring in decimal long before it made any difference that would be worth marketing. "Apparently, Plaintiff believes that he could sue an egg company for fraud for labeling a carton of 12 eggs a 'dozen,' because some bakers would view a 'dozen' as including 13 items." - Western Digital 2006 – endolith – 2011-07-26T11:06:36.410

0

When you consider that numbers on computers are binary, and 2^10 is 1024, it makes perfect sense. It's much easier to work with 1024 rather than 1000, because you can easily divide by 1024 using only integer math and bit shifting. Dividing by 1000 is a much more expensive operation, which may need floating point math.

E.g.

bytes = 1 073 741 824
kilobytes = bytes >> 10 = 1 048 576
megabytes = kilobytes >> 10 = 1024
gigabytes = megabytes >> 10 = 1

Jo-Herman Haugholt

Posted 2011-05-23T11:00:36.317

Reputation: 109

You seriously think the computation time is relevant? Why don't computers process "km" as "1024 m", then, if it's so hard to convert? – endolith – 2011-07-25T21:24:17.463

@endolith Yes I think so, at least historically. While it may be negligible today, in the early days when every CPU-cycle was at a premium, a quick and easy calculation that gave an decent answer would be preferable for something like this. Especially if people knew by convention that 1KB meant 1024 bytes. – Jo-Herman Haugholt – 2011-07-31T10:47:56.337