## Saturday, September 6, 2008

### Hard disk size measurement

Manufacturers and the operating system measures hard disk capacity in a different way. That is the binary gigabyte and the decimal gigabyte.When we install a new 160 GB(manufacturer measurement) hard drive we see (operating system reports) only 149 GB.Similarly if we install a 4GB hard disk we get 3.72GB.

This difference is because of the way in which manufacturers and software developers calculate the drive capacity.Technically, hard drive capacity is calculated by multiplying the number of cylinders, sectors, and heads time 512.

Capacity = Cylinders * Heads * Sectors * 512 (bytes per sector)

So a typical drive with 7752 cylinders, 16 heads and 36 sectors, we get:
7752 * 16 * 63 * 512 = 4,000,776,192 bytes.

Hard disk manufacturers use decimal megabyte to determine the size of their hard drive.
i.e. 4,000,776,197 bytes / 1,000,000,000 = 4.0 GB

Whereas, software makers use binary megabytes to calculate the drive size.A binary gigabyte is 1,073,741,824 bytes and a binary megabyte is 1,048,576 bytes.
So we get: 4,000,776,192 bytes / 1,073,741,824 = 3.72