Warning: Division by zero in /var/www/mooby/liekens.net/anthony.liekens.net/index.php on line 868

Warning: Division by zero in /var/www/mooby/liekens.net/anthony.liekens.net/index.php on line 868

Warning: Division by zero in /var/www/mooby/liekens.net/anthony.liekens.net/index.php on line 868

Warning: Division by zero in /var/www/mooby/liekens.net/anthony.liekens.net/index.php on line 868

Warning: Division by zero in /var/www/mooby/liekens.net/anthony.liekens.net/index.php on line 868

Warning: Cannot modify header information - headers already sent by (output started at /var/www/mooby/liekens.net/anthony.liekens.net/index.php:868) in /var/www/mooby/liekens.net/anthony.liekens.net/index.php on line 709
anthony.liekens.net » Misc » Binary Multiples

Home    Personal    Work    Computers    Miscellaneous

Prefixes for binary multiples

Abstract

1024 bytes is not really a kilobyte, but a kibibyte. Kilo stands for 10^3, which is 1000, which is not equal to 1024. I'm trying to keep myself to these S.I. rules, as they are supposed to be the official ones.

When kilobyte should be kibibyte

Most of us (if we're assuming some knowledge of S.I. units, the "international system of units") know that a kilogram is equal to 1000 grams, or that a kilometer stands for 1000 meters. In contrast to this, it is commonly said that a kilobyte contains 1024 bytes, not a 1000 bytes. This, obviously, can cause some confusion.

As an example, if a manufacturer of hardware produces a hard drive and states that it can contain 100 gigabytes, we usually suspect that it will actually be able to contain 100x1024x1024x1024 bytes (or 100x1024x1024 kilobytes or 100x1024 megabytes). When we actually start using the new drive on our computer, our system tells us that it actually contains less than what we expect. This is because the hard drive manufacturer uses the international system of units (S.I.) instead of what we're commonly using in computer science. The drive does not contain 100x1024x1024x1024 bytes, but it contains 100x1000x1000x1000 bytes. Indeed, the "giga" prefix before the unit officially denotes 10^9, not 2^10^3.

In contrast, a drive that actually contains 100x1024x1024x1024 bytes is called a hard drive with 100 gibibytes, according to the international system. The hard drive manufacturer uses this difference and sells less than what people are expecting to buy. There is nothing wrong with this, the manufacturer is simply following the standard. But this standard is not commonly used in computers, thus confusing the buyer. Note that you can't sue the manufacturer over this, you have made a mistake, not the manufacturer.

Yes, but

You might be saying, "yeah well, between 1000 and 1024 there's only 2.4% difference, so it doesn't really matter that much". This might be right, but note that the difference between multiples of 1000 and multiples of 1024 become bigger as the exponent is increased. As an example, the difference between 1 Tera and 1 Tebi is already 10%! (see also the following table)

The prefixes

PrefixFactorExample
kibi (Ki)(2^10)^1=1,0241KiB (kibibyte) = 1,024 bytes
mebi (Mi)(2^10)^2=1,048,5761MiB (mebibyte) = 1,048,576 bytes
gibi (Gi)(2^10)^3=1,073,741,8241GiB (gibibyte) = 1,073,741,824 bytes
tebi (Ti)(2^10)^4=1,099,511,627,7761TiB (tebibyte) = 1,099,511,627,776 bytes

Note that the prefix "kibi" (and the others) comes from "kilo binary".

Links

Edit (locked) - History - Recent Changes - Search - Statistics
All contents copyrighted 2000-2006 Anthony Liekens unless otherwise noted. Powered by PmWiki
Page last modified on October 14, 2005, at 01:45 PM.