Of Zen and Computing

Why Your Computer Thinks Its Hard Drive Is Smaller Than the Manufacturer Claims

Wednesday, August 13, 2008

Why does my computer think my hard drive is smaller than it really is? It’s supposed to be 500 gigabytes, but my computer says the hard drive is 465.44 gigabytes!

I bet you want me to tell you who’s correct regarding the size of your hard drive. Was the manufacturer lying about the drive’s size? Or is your computer’s math flawed? The answer is option number 3: nobody’s lying, and the math is correct.

Wait a minute…

How can they both be right?

The hardware manufacturers are thinking in powers of 10 — a line of thinking that also comes very easily to most people. A kilobyte is 1,000 (103) bytes. A megabyte is 1,000 kilobytes. A gigabyte contains 109 (1,000,000,000) bytes. It is extremely easy to both explain and understand the size of a storage device such as a hard drive in this manner.

Programmers think in powers of 2. The basic unit of information in computer science is the bit, which has two possible values: 0 or 1. 8 bits make up a byte. A kilobyte is 210 (1,024) bytes, a megabyte is 1,024 kilobytes (220), and so on.

The point of confusion

A hard drive manufacturer who makes a 500 GB hard drive has sold you a storage device containing space for 500×109, or 500,000,000,000 bytes. When you hook that drive up to your computer, an operating system such as Microsoft Windows or Mac OS X is given the task of figuring out how much data the OS can cram into that device.

The software asks itself, “Given 500,000,000,000 bytes of storage capacity, how much data can I record?”

To answer this question, the software does some binary math (powers of 2). It concludes that 500,000,000,000 bytes is roughly 465.44×230… 465.44 gigabytes according to the binary definition of 1 GB = 1×230 bytes. In other words, about 465.44 gigabytes worth of files can be stored on a drive with room for 500×109 bytes.

Why the difference?

The root of all this confusion is that your hard drive manufacturer and the programmers who built your computer’s operating system have different definitions regarding the exact size of a gigabyte. One party uses the decimal definition of 1,000,000,000 (1×109) bytes while the other uses the binary definition of 1,073,741,824 (1×230) bytes. Different prefixes for binary units of measure have been recommended, however many people in the technology field have not adopted the terminology (source).

Honestly, I don’t blame them. I don’t know a single non-technical person who has any idea what a gibibyte is, let alone anyone who wouldn’t be entirely confused by the difference between a gigabyte (1×109) and a gibibyte (1×230).

File under: Computer Science, Uncategorized

Digg icon StumbleUpon icon del.icio.us icon Facebook icon

Other articles related to this page

© 2006-2008 OfZenAndComputing.com
E-mail Disclaimer | Terms of Service & Disclaimer | Sitemap

Subscription Options
Search Our Archive of How-To Articles and Blog Posts