Kilobyte

   

The kilobyte comes in two flavours, depending on the context in which it is used, meaning either 1,000 or 1,024 bytes.

The kilobyte (kB)

This uses the SI prefix kilo, and simply refers to 1,000 bytes (as a kilometre equals 1,000 metres). This is the notation used by telecommunication engineers.

The kilobyte (KB or K)

This means 1,024 bytes and is used describing storage capacity and memory size of computers (as it is a power of 2, making it easy for computers, which work in binary, to manipulate).

Since 210 = 1,024 ≈ 1,000 = 103, computer scientists, engineers and programmers alike created the habit of calling 1,024 bytes a kilobyte; they wrote "KB", sometimes abbreviated as "K", to differentiate this from the 'borrowed' SI prefix; M (Mega) was interpreted as K×K = 220 (≈ 106), and G (Giga) as K×K×K = 230 (≈ 109).

Some examples:

  • The memory size of a later x86 processor PC is 640 KB = 655,360 bytes.
  • The maximum size of a DOS program of the *.com variety is 64 KB = 65,536 bytes.
  • A 5¼-inch diskette formatted to 720 KB will hold 737,280 bytes of information.
  • A hard disk partition of 2.0 GB has a storage capacity of 2,048 MB (or 2,097,152 KB).

Note the distinction between a kilobyte and a kilobit. A kilobit is abbreviated as Kbit (preferably) or as Kb, and usually means 1,000 bits. "KB" with an upper case B usually refers to the kilobyte. Assuming eight bits to one byte, 1KB = 8Kbit.

This confusion is due to a number of standardization organizations. The SI dislikes the usage of an upper case "B", which stands for Bel or "K" which stands for the Kelvin unit of temperature. Some have suggested that "k" be used for 1000, and "K" for 1024 in the context of computer science. In this definition we would have kb:kilobit (1000 bit), Kb:kilobit (1024 bit), kB:kilobyte (1000 byte) and KB:kilobyte (1.024 Byte). Unfortunately this is not extended to the higher order prefixes and has never been widely recognized. In 1998 the IEC came up with the kibibyte (short "Ki"), to solve this conflict, but this has not spread widely either.

The clash of two worlds

These two definitions co-existed for nearly two decades with almost nobody complaining. However, with the advent of the home computer in the late 1980s, a lot of people, who had never been involved with computing or programming, were now confronted with these specialized terms.

Storage device manufacturers realized that using the SI conventions resulted in higher nominal figures.

First, there was the case of the 1.44 MB diskette: Formatting a 3½-inch disk with a standard controller yields a storage capacity of 1,440 KB (or 1,474,560 bytes). According to the above, that converts to 1.41 MB (binary); the manufacturers decided to divide by 1,000 instead and arrived at 1.44 MB. Despite this being a misnomer, the label stuck; e.g. there is still a "/f:1.44" command line parameter for the MS-DOS "format".

When moving to hard disk drives, the discrepancy showed even more: In the case of a 2 GB drive with its nominal (decimal) capacity of 2,000,000,000 bytes, after having been built in and formatted, the machine's operating system will 'truthfully' report that it recognized 1.86 GB. While the difference (when using GB) is less than 7%, it becomes more apparent with higher capacity (e.g. with an 80 GB drive, about 5 GB seem to be 'missing', a nasty shock for the un-initiated computer user).

The kibibyte (KiB)

In 1998, the IEC decreed to call 1,024 bytes a kibibyte (KiB) — a term which is only slowly catching on. During the transition period, the IEEE suggests using a lower-case "k" for the decimal kilo (1,000) and, if properly pointed out, an upper-case "K" for the binary kilo (1,024), thereby taking the historical development into account.

See also

External links



da:Kilobyte fr:Kilo-octet it:Kilobyte nl:Kilobyte

Retrieved from "http://www.mywiseowl.com/articles/Kilobyte"

This page has been accessed 930 times. This page was last modified 04:24, 26 Nov 2004. All text is available under the terms of the GNU Free Documentation License (see Copyrights for details).