Wednesday, December 10, 2008

File sizes – bits bytes

Do you want to know why when you buy a 320GB hard drive, your computer only reports it as 298 GB? Here is the reason why.

Bits bytes heard of it? You may, you may not.
1 bit is a digit in binary, the possible numbers of a bit is either

1 or 0
also means
on or off
also means
5volts or 0volt
also means
electrical flow or no electrical flow 

Sense of scale :
8 bits(b) = 1 Byte
1 kilobyte(kB) = 1024 Bytes
1 Megabyte(MB) = 1024 kiloBytes
1 Gigabyte(GB) = 1024 Megabyte
1 Terrabyte(TB) = 1024 Gigabyte
1 Terrabyte(TB) = 8,796,093,022,208 bits

Why 1 kilobyte is equal to 1024 bytes? This is because of this is way that computer counts(binary 1 or 0). In short, its 2^10.

This means its  2x2x2x2x2x2x2x2x2x2 = 1024.

Hard drive(HDD) manufactures count 1 kilobyte as 1000bytes not 1024 bytes. When you buy a 320 GB HDD, you are getting 320000000000 bytes but since computer counts 1kilo as 1024 it would only appear as 298.023223876953125 GB

This also applies to USB flash drive, RAM etc.

No comments: