If you have a cold Hot Pocket, is it just a pocket?


BrettBits > Text Files > Why Is My New Hard Drive Missing Space?

Why Is My New Hard Drive Missing Space?




Written by Brett McLean.

The Question

Have you ever purchased a new computer or new hard drive and found that its storage capacity isn't as high as the manufacturer stated? (This also applies to memory cards for cameras and MP3 players; basically anything that promises it has so many gigabytes of storage). Here are a few examples:
  • A laptop has a 40 gigabyte hard drive, but Windows XP reports that the capacity of the physical drive is only 37.2 gigabytes.
  • A brand-new 30 gigabyte iPod reports that it can only hold a total of 27.8 gigabytes in data.
  • A digital camera containing a 2 gigabyte (this is 2000 megabytes) SecureDigital memory card states that the card has a total capacity of 1936.8 megabytes.
  • A 1 terabyte hard drive appears to have 931 gigabytes when Windows XP is queried about its total size. A terabyte should equal about 1000 gigabytes.
The questions that will be answered here are as follows: Where has that missing space gone? Why is my 1 terabyte hard drive missing 69 gigabytes?

The Answer

It turns out that the answer has to do with your electronic devices and their operating systems using a different definition of "gigabyte" ("GB") than that of the manufacturer's of storage devices such as memory cards and hard drives. When manufacturers of such devices say "GB", they mean what is called a "decimal gigabyte", which equals exactly 1,000,000,000 (one billion) bytes (a byte is a fairly basic unit of storage in computers). When your device's operating system describes the capacity of the storage medium, they typically use what is called a "binary gigabyte", which equals exactly 1,073,741,824 bytes. Because of this discrepancy, a device has less binary gigabytes than decimal gigabytes.

It turns out that a decimal gigabyte is approximately 93% the size of a binary gigabyte, so if your hard drive is 40 decimal gigabytes, your operating system will report that it is approximately:

40 decimal gigabytes * 93% = 40 * 0.93 = 37.2 binary gigabytes

Which is exactly the hard disk capacity that is reported by operating systems such as Windows XP. Likewise, a 1 decimal terabyte hard drive is 1000 decimal gigabytes. Windows will report that hard disk's capacity as approximately:

1000 decimal gigabytes * 93% = 1000 * 0.93 = 930 binary gigabytes (this is very close to what Windows reports; however, the multiplication factor isn't exactly 0.93, as we'll see below)

So simply put, when you purchase a digital storage medium, you can expect your operating system to identify it as being about 93% the size that you expect it to be. You're not being ripped off; it's just that the word "gigabyte" is used to mean two different things.

Notation

So when one uses the word "gigabyte" (GB), we have no way of knowing whether or not they mean "binary gigabyte" or "decimal gigabyte". It turns out that we have notation to solve this problem, but it has yet to find widespread adoption.

In 1999, the International Electrotechnical Commission (IEC) created a new notation: GiB. Their intent is for "GB" to mean "decimal gigabyte", and for "GiB" to mean "binary gigabyte" (GiB is short for Gibibyte, or "giga-binary-byte"). However, a lot of entities (including most operating systems) still use "GB" for both. Currently, one can only be sure that "GiB" means binary gigabyte, whereas "GB" could mean either.

For the rest of this article, we will be following IEC notation, so GB means "decimal gigabyte" and GiB means "binary gigabyte".

Review of Exponents

In the next section, we show how that 0.93 factor is calculated, but first we need to understand how exponents work.

Exponents are by no means a difficult concept. Given two whole numbers, X and Y, the notation XY means "X multiplied by itself Y times". This becomes clearer with a few examples:
  • 103 = 10 * 10 * 10 = 1000 (here 103 means 10 multiplied by itself 3 times)
  • 56 = 5 * 5 * 5 * 5 * 5 * 5 = 15625 (56 means 5 times itself 6 times)
  • 25 = 2 * 2 * 2 * 2 * 2 = 32 (25 means 2 times itself 5 times)
It's that simple. Let's move on.

Why a GB is 93% of a GiB

In this section, we finally work out how to find that 0.93 factor is calculated.

A GB (remember, this is a decimal gigabyte) is defined as being exactly equal to 109 = 1,000,000,000 bytes (one billion bytes). A GiB (a binary gigabyte) is defined as being exactly equal to 230 = 1,073,741,824 bytes (a little over one billion bytes).

We can derive a ratio between a GB and a GiB by dividing the value of one by the other. We do so thusly:

(bytes per GB)/(bytes per GiB) = (109/230) = (1000000000/1073741824) = 0.931322574615478515625

This is the exact value of that approximate 0.93 factor we used above. For calculating how many GiB you will have in your new 500 GB hard drive, it is usually sufficient to just multiply the number of GB by 0.93, or 0.931; plus these are easier to memorize.

What about Kilobytes, Megabytes, Terabytes, etc?

Suppose you have a 256 MB flash drive, and you want to know how many binary megabytes that is. Do you multiply 256 by 0.93?

Well, no. It turns out that that only applies to the difference between decimal and binary gigabytes. We can calculate ratios for kilobytes, megabytes, terabytes, et cetera by dividing the number of bytes per decimal definition by the number of bytes per binary definition, as we did above.

For example, to find the "megabyte ratio", we first need to note that a decimal megabyte (MB) equals 106 = 1,000,000 bytes and a binary megabyte (MiB) equals 220 = 1,048,576 bytes. So then our "megabyte ratio" is:

(bytes per MB)/(bytes per MiB) = (106/220) = (1000000/1048576) = 0.95367431640625

So a 256 MB flash drive will be reported by an operating system as being about 256 * 0.95367431640625 = 244.1 MiB in size.

The following chart shows factors for other denominations of storage.

Denomination of storage Decimal definition Binary definition Ratio (decimal definition divided by binary definition)
Kilobyte 103 = 1,000 210 = 1,024 0.9765625
Megabyte 106 = 1,000,000 220 = 1,048,576 0.9536743
Gigabyte 109 = 1,000,000,000 230 = 1,073,741,824 0.9313226
Terabyte 1012 = 1,000,000,000,000 240 = 1,099,511,627,776 0.9094947
Petabyte 1015 = 1,000,000,000,000,000 250 = 1,125,899,906,842,624 0.8881784


It can be seen that the ratio gets smaller and smaller as we move to larger denominations; the discrepancy between a binary petabyte (PiB) and a decimal petabyte (PB) is much more significant than between a GiB and a GB.

A final example for clarity on using the above chart: Suppose you have a 4 PB hard drive; how many PiB is that? Simple: The chart above shows that the factor between the two is about 0.8881784. So you would have 4 PB * 0.8881784 = 3.5527136 PiB.

Conclusion

The problem of "missing" storage space is a question that has probably crossed the mind of many computer users at one time or another. Being that the storage discrepancy becomes more pronounced as hard drives become larger and larger, I believe that more and more consumers will become interested in the explanation given here.

Share This Page!

Digg this!Add to Del.icio.usAdd to StumbleUponAdd to Facebook Profile
 



Subscribe to RSS feed