i

# How many bytes in a megabyte

#### Roughly translated:

1 byte (B) = 8 bits

1 kilobyte (KB) = 1024 bytes

1 megabyte (MB) = 1024 kilobytes

1 gigabyte (GB) = 1024 megabytes

1 terabyte (TB) = 1024 gigabytes

#### Why 1024?

When we think of measurement, one kilogram is a 1000 grams and one kilometre is a 1000 metres. So why is one kilobyte equal to 1024 bytes? The answer lies in how early computer engineers interpreted tiny amounts of storage. They noticed that 2^10 (1024) was very close to 10^3 (1000) and therefore used the prefix of “kilo” taken from the greek word "khilioi" (meaning one thousand) to make the word kilobyte.

#### What is a Gigabyte?

Things become more confusing when we reach a Gigabyte. One gigabyte actually translates as 1024 bytes x 1024 bytes x 1024 bytes which is equal to 1,073,741,824 bytes. However, most people refer a Gigabyte as 1,000,000,000 (one billion) bytes, where Giga means one billion.

#### 1000 or 1024 - Why all the confusion?

So, why all the Confusion? Well, in 1998, the IEC (International Electrotechnical Commission) addressed the issue of multiple definitions by creating prefixes such as kibi, mebi, gibi to unmistakeably denote powers of 1024. Therefore, according to ISO/IEC 80000 standard, 1024 bytes should be represented as a kibibyte (KiB). The IEC further specified that the kilobyte should only be used to refer to 1000 bytes.

#### Which definition is correct?

The correct definition of a kilobyte still causes lots of debate between professionals, especially in online forums. So, which one do you use? Well, if you're adhering to the ISO/IEC standards, you should refer to a one Kilobyte as 1000 bytes however, in practice, kilobyte is still commonly referred to by many as 1024 bytes - in fact, most exam providers still accept both 1000 and 1024 as an acceptable answer.