# Bits, bytes, and their multiples

Posted on January 16, 2023, by Sébastien

———

This post covers the absolute basics, and is aimed at people who aren't familiar with these concepts (yet).

## Bits

The bit is the smallest unit of information.

It has only two possible values: 0 or 1.

The symbol for the bit is either simply "bit", or the lowercase letter "b".

## Bytes

A byte consists of eight bits.

It's represented by the uppercase letter "B".

Capitalization is crucial, as the lowercase letter "b" represents the "bit" unit, as mentioned above.

## Multiples (powers of 10)

Strictly speaking, the "kilo" prefix denotes one thousand – as in "kilogram" or "kilometer" – "mega" is one million, "giga" is one billion, "tera" is one trillion, and so on.

Therefore:

- 1 kB (kilobyte) = 1000 bytes
- 1 MB (megabyte) = 1000 kB = 1,000,000 bytes
- 1 GB (gigabyte) = 1000 MB = 1,000,000 kB = 1,000,000,000 bytes
- 1 TB (terabyte) = 1000 GB = 1,000,000 MB = 1,000,000,000 kB = 1,000,000,000,000 bytes

Again, capitalization is important:

Interpreted literally, 1 mb/s would be 1 millibit per second.

That is to say, 0.001 bit/s, instead of the intended 1,000,000 bit/s (1 Mbit/s).

## Multiples (powers of 2)

Sometimes, multiples of 1024 are used instead of multiples of 1000.

This number was chosen because 1024 is a power of 2 (namely, 2¹⁰).

Strictly speaking – again – multiples of 1024 should use different prefixes than multiples of 1000:

- 1 KiB (kibibyte) = 1024 bytes
- 1 MiB (mebibyte) = 1024 KiB = 1,048,576 bytes
- 1 GiB (gibibyte) = 1024 MiB = 1,048,576 KiB = 1,073,741,824 bytes
- 1 TiB (tebibyte) = 1024 GiB = 1,048,576 MiB = 1,073,741,824 kB = 1,099,511,627,776 bytes

However, there's a catch:

Operating systems such as Windows use the metric prefixes… to represent binary multiples!

This can lead to some confusion:

- Your brand new HDD (or SSD), marketed as 1 TB, does indeed contain 1,000,000,000,000 bytes
- Windows will report a capacity of only 931 GB (even though it's technically 931 GiB)

## Common uses of bits, bytes, and their multiples

- As mentioned above, storage device manufacturers use decimal multiples of bytes (e.g. 1 TB = 1,000,000,000,000 bytes)…
- …whereas Windows uses binary multiples of bytes (e.g. 1 GB = 1,073,741,824 bytes) for file sizes and drive sizes
- RAM sticks use binary multiples of bytes (e.g. 8 GB = 8,589,934,592 bytes)
- Network interface speeds are typically expressed as decimal multiples of bits
- => Example 1: Gigabit Ethernet (1 Gbit/s or 1 Gbps) can transmit up to 1,000,000,000 bits per second
- => Example 2: Until 2008, Wi-Fi had a maximum theoretical data rate of 54 Mbit/s, i.e. 54,000,000 bits per second
- File transfers – as displayed in your browser, or your operating system – may use multiple of bytes. Therefore, your download speed won't ever show more than 125 MB/s (or 119 MiB/s) when you're on Gigabit Ethernet.

## A note about internationalization

In some languages, the word "byte" is not used, and a different letter may be assigned to represent it.

In particular, the French word for "byte" is "octet", and the symbol is "o".

This causes quite some confusion when a native French speaker sees a label such as "32 GB" for the first time (on a USB flash drive, typically).

They might think they received a 32 gigabit device, which would be 8 times smaller than the 32 gigabytes they wanted ("32 Go").