| |||||||||
The kilobyte comes in two flavours, depending on the context in which it is used, meaning either 1,000 or 1,024 bytes.
This uses the SI kilo prefix, and simply refers to 1,000 bytes (as a kilometer equals 1,000 meters). This is the notation used by telecommunication engineers.
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.
They didn't stop there, but of course carried this concept further along; so M (Mega) was interpreted as K×K = 220 (≈ 106), and G (Giga) as K×K×K = 230 (≈ 109).
Some examples:
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 this specialized lingo.
When it dawned on storage device manufacturers, that using the SI conventions resulted in higher nominal figures, the confusion really started.
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).
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.