Artemy Lebedev

§ 84. How many bytes does a kilobyte contain?

February 26, 2002



My name is Alice, but—“
“It’s a stupid name enough!” Humpty Dumpty interrupted impatiently. “What does it mean?”
Must a name mean something?” Alice asked doubtfully.
“Of course it must,” Humpty Dumpty said with a short laugh: “my name means the shape I am—and a good handsome shape it is, too. With a name like yours, you might be any shape, almost.”

L. Carroll. Through the Looking-Glass


Today’s section deals with a topic covered at the opening pages of any computer manual. The latter customarily starts out with explaining minimal terminology: there’s a bit, and when eight bits are brought together, they become a byte. When the number of bytes mounts to 1024, they become a kilobyte. Everyone who cares reads this tiresome blather at least once, stashes it away in one’s memory or discards it right away, goes on to thumb through the text, closes the book—and that’s it.



But it’s where our inquiry takes its roots—an inquiry whose ending is apt to see manuals’ authors wind up visiting refresher courses.



In the days of old when knights were bold there were computers. And everything about them would be measured in bytes. But computers grew fast, and so did the bytes—quickly they grew and finally there were zounds of them. Then the wise computer trailblazers devised the term K that would stand for 210 (i.e. 1024) bytes. Their choice of 2 was anything but accidental: computers worked, work and will work in the foreseeable future in the binary system.



As for humankind, its development stopped at the decimal number system that was experimentally picked out after prolonged selection a trifle earlier than a computer was invented. In the late 18th century the standard-loving French came up with the metric system of measurements that was based exactly on ten.




Housekeeping tip

In the metric system some Greek or Latin root is usually attached to everything. All these prefixes raise 10 to some power. Say millimeter is 10-3 meters (one thousandth of meter), kilometer—103 meters (one thousand meters).

All metric indices should be written correctly not to distort their meaning: μ  stands for micro…, mmilli…, Mmega….




So we know that the decimal prefix “k” stems from the word “kilo” (a thousand), it’s written in lower case and means multiplication by a thousand. The binary K has nothing to do with “kilo” just because a computer doesn’t count bytes in tens—it was people who stepped in to do that. Looking at the words “60 K bytes”, some sysadmin said “sixty kilo bytes :-)”. He was overheard by another sysadmin or some handy-andy who thought it worth remembering. So on it went. (Example of a similar interpretation of a letter in a metric way: megabyte—meter).



This is the way we got an interpretation of the unit “K byte” (kabyte) as a “kilobyte”, although nobody originally meant that. The other meanings were selected in a similar way: megabyte, gigabyte, terabyte… All these words sounding like metric units are in fact different powers of two. Thinking in the powers of two is way too hard: nobody thinks of a megabyte as 1024 kilobytes.



But that’s only half of the story. The most interesting thing is that apart from binary kilobytes, there are decimal ones. And we have to deal with them every day.



It is a historical tradition that computer memory (RAM) is measured in K-bytes. Therefore 10 MB of memory are 10,485,760—by no means 10,000,000—bytes.



The larger portion of hard drives makers indicates the volume of their produce in decimal megabytes and gigabytes. In contrast to that, operating systems see hard drives from the viewpoint of binary megabytes and gigabytes. So when you buy a 50 GB hard drive, be prepared for it to fall 3.5 GB short of the target. The remaining 46.5 GB—in binary gigabytes!—is the fair volume of the drive.



The telecom industry has its own life to live. It has a long-standing custom to measure everything in decimal kilobytes. The data transfer speed is normally measured in kilobits per second (kb/s). With favorable weather conditions, a 28.8 kb/s modem would transfer exactly 28,800 bits per second, or about three binary kilobytes and a half per second on average. If you happen to come across a 28.8 K modem, remember that the “K” index standing for “kb/s” is a fancy thing coined by marketing specialists that’s never used by professionals.



A special case was with the invention of the 3.5-inch diskette. Every box has the “1.44 MB” marking on it. Everybody remembers this number. And everybody remembers that the floppy can hold less than it is promised. Why is that? Because the disc volume is indicated in decimal bytes: 1,440,000 decimal bytes are equal to 1.44 decimal MB. But in binary bytes it’s 1.4 MB.



If by now you’ve gotten a little tired of the difference between binary and decimal units, imagine how much dough hardware producers earn on that. Advertising will stick at nothing to make the figure look as enticing as ever. This entertaining come-on will mean nothing, but greenbacks in your purse will feel a little easier at heart when you eventually shell out. That’s all you are actually expected to do.




Obiter dictum

If you happen to look at LCD monitors’ specifications, take notice of the following remark: “screen diagonal—15″ (an equivalent of 17″ CRT)”. What it means is just that the manufacturers of conventional picture tubes measure their diagonals before the casing is added on. There are no consumers in the whole world who’d go shopping with an inch ruler to measure the screen size. The main thing is winning the competition of beautiful figures.

Since the hi-tech industry has not so far learnt how to make flat panel displays with an invisible area, advertising departments are forced to let out the secrets of last year’s advertising tricks.




Seeking to somehow sort out this schizophrenic situation, the International Electrotechnical Commission (IEC) tried to get things in order in March 1999. The standards body proposed new names for binary measurements, coining new prefixes and suggesting that kilobyte be renamed into kibibyte (KiB), megabyte—into mebibyte (MiB) etc. In November 2000 these changes were officially written into international standards.

See: IEC 60027–2 (2000–11) — Letter symbols to be used in electrical technology — Part 2: Telecommunications and electronics

The originally good idea flopped—on the day this section was composed a search for “kibibyte” in Yandex, Russia’s number one search engine, turned up seven sites. Of these seven, two were collections of anecdotes.



A good name is an essential thing, after all, if you aspire to worldwide recognition: “beeping” was out of anybody’s plans, while “mebibyte” sounds equally weird in all languages.



Finally, below you will find a table with correct English names and acronyms.




Name Acronym Meaning IEC standard (uncommon)

bit b 0 or 1
byte B 8 bits
kilobit kbit
kb
1000 bits
kilobyte (binary) KB
Kbytes*
1024 bytes kibibytes
kilobyte (decimal) kB 1000 bytes
megabit Mb 1000 kilobits
megabyte (binary) MB
Mbytes*
1024 kilobytes mebibytes
megabyte (decimal) MB 1000 kilobytes
gigabit Gb 1000 megabits
gigabyte (binary) GB
Gbytes*
1024 megabytes gibibytes
gigabyte (decimal) GB 1000 megabytes



*

This acronym may exist, but it’s too long and open to various readings.




E-mail: mailbox@artlebedev.com
Contact information Telephone: (495) 540-18-00
 
© 1995–2024 Art. Lebedev Studio

Order a design...