Wednesday, May 20, 2009

Simple Pedantry

I checked out www.wolframalpha.com today and for the most part amused myself testing the "computational knowledge engine". It was good times having it plot out number sequences, compare the popularity of names, calculate the date on which I'll turn 10,000 days old, etc. But then I saw something horrible, something that made the fun cease and my blood boil. I had typed "kilobyte, megabyte, gigabyte, terabyte, petabyte, exabyte" into the engine, and the result was disgusting. The damnable Wolfram engine defined each term as power of 10 instead of a power of 2! Damn them, how could they? The engine is supposed to work with facts and truth, not silly approximations. To define a kilobyte as 1000 bytes is blasphemous under such pretenses.

For those not enlightened with the true values, I'll explain:

1 kilobyte = 1024 bytes
1 megabyte = 1024 kilobytes = 1,048,576 bytes
1 gigabyte = 1024 megabytes = 1,048,576 kilobytes = 1,073,741,824 bytes

The reason for these values has to do with binary (the base 2 number system which all computer data is represented by). We, being used to a base 10 system, prefer numbers like 10, 100, and 1000, and they can be represented as powers of the base number (e.g. 1000 = 10^3). In binary, 1000 is an ugly number, but 1024 is close enough and a very easy number to use, especially as a power of 2. Using power notation:

1 kilobyte = 2^10 bytes
1 megabyte = 2^10 kilobytes = 2^20 bytes
1 gigabyte = 2^10 megabytes = 2^20 kilobytes = 2^30 bytes

By using the approximations, they have introduced an ever-increasing margin of error. As the unit of data grows, the error grows as well.

KB - 1024 - 1000 - 2.4%
MB - 1,048,576 - 1,000,000 - 4.9%
GB - 1,073,741,824 - 1,000,000,000 - 7.4%
TB - 1,099,511,627,776 - 1,000,000,000,000 - 10%

Hard drive manufacturers have been using these approximations for years when selling their drives. When you buy a "500 GB" HDD, it's actually only about 5 billion bytes (465.7 GB), which is about 7.4% less than what they advertise it as. Of course, if you read the fine print on the back of the box, they admit to their approximation, but it is still misleading.

Hopefully, one can now understand my outrage that the WolframAlpha computational knowledge engine is perpetuating the lie. Fret not, for I have made my disapproval known to them by providing some most unsatisfactory feedback. We can all sleep easy now.

No comments: