You are here

Kibibytes, Mebibytes, and Gibibytes, Oh My!

Error message

Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in drupal_strip_dangerous_protocols() (line 1458 of /home2/crephoto/public_html/techblog/includes/common.inc).

So, we all know that a 'kilobyte' is not 1,000 bytes but 1,024 bytes (2^10), right? Wrong. A kilobyte is actually defined as 1,000 bytes, and therefore is a rather useless word to everyone except hard drive manufacturers. What we really mean to refer to is a kibibyte. Seriously. And scaling up there are mebibytes and gibibytes. Or so the International Electrotechnical Commission decreed in December 1998. The topic was discussed in the March 1999 Tech Beat, the online publication of the National Institute of Standards and Technology

Kibibyte. Good grief. I seriously do doubt that this will ever become a standard. Not so much because of ingrained usage of inaccurate decimal-based terms, but because no-one will be able to say it with straight face. Tebibytes, Pebibytes... what a thought!

If you follow the above math up to the gibibyte, (2^10)^3 then your factor is about 1.07 (or .93, depending on whether you're travelling North or South). So if your OS reports your brand new 200GB drive as only 186GB, they're not ripping you off, and it's not "lost" in the FAT or somewhere else, it's just using base-two math. This is the reason for both the "-h" and "-H" option on the *nix "df" shell command.