Capacity measurements
Hard disk manufacturers specify disk capacity using the SI definition of the prefixes "mega", "giga", and "tera". This is largely for historical reasons. Disks with multi-million byte capacity have been used since 1956, long before there were standard binary prefixes. The International Electrotechnical Commission (IEC) only standardized binary prefixes in 1999. Many practitioners early on in the computer and semiconductor industries used the prefix kilo to describe 2^10 (1024) bits, bytes or words because 1024 is close to 1000. Similar usage has been applied to the prefixes mega, giga, tera, and even peta. Often this non-SI conforming usage is noted by a qualifier such as "1 kB = 1,024 bytes" but the qualifier is sometimes omitted, particularly in marketing literature.
Operating systems, such as Microsoft Windows, frequently report capacity using the binary interpretation of the prefixes, which results in a discrepancy between the disk manufacturer's stated capacity and what the system reports. The difference becomes much more noticeable in the multi-gigabyte range. For example, Microsoft's Windows 2000 reports disk capacity both in decimal to 12 or more significant digits and with binary prefixes to 3 significant digits. Thus a disk specified by a disk manufacturer as a 30 GB disk might have its capacity reported by Windows 2000 both as "30,065,098,568 bytes" and "28.0 GB." The disk manufacturer used the SI definition of "giga," 10^9. However utilities provided by Windows define a gigabyte as 2^30, or 1,073,741,824, bytes, so the reported capacity of the disk will be closer to 28.0 GB. For this reason, many utilities that report capacity have begun to use the aforementioned IEC standard binary prefixes (e.g. KiB, MiB, GiB) since their definitions are unambiguous.
Some people mistakenly attribute the discrepancy in reported and specified capacities to reserved space used for file system and partition accounting information. However, for large (several GiB) filesystems, this data rarely occupies more than a few MiB, and therefore cannot possibly account for the apparent "loss" of tens of GBs.
The capacity of a hard disk can be calculated by multiplying the number of cylinders by the number of heads by the number of sectors by the number of bytes/sector (most commonly 512). However, the cylinder, head, sector values are not accurate for drives using zone bit recording, or address translation. On ATA drives bigger than 8 gibibytes, the values are set to 16383 cylinder, 16 heads, 63 sectors for compatibility with older operating systems.
Source:
http://en.wikipedia.org/wiki/Hard_disk)