Bits and Bytes

·

2 min read

What are they?

Bit stands for Binary Digit. Binary refers to the base 2 number system. Instead of the normal base 10 system used in everyday life. The bit is the smallest unit it can represent as a 1 or 0, true or false, or on and off. All computers run on Binary and they use groups of bits to store values.

A group of 8 bits is a byte. The amount of data a byte contains is 256 or 2^8. This allows for a range of 0-255 in terms of base 10. Note there is also a term called nibble which is 4 bits or half a byte.

As with normal Base 10 the position of the bits matter. With every bit futher to the left represents a higher power of 2 just like how Base 10 represents a higher power of 10. In the example below 8 1s represents Base10 value of 11,111,111 in base 10 format or Base10 value of 255 in base 2 format.

Below is an example of how a byte can be used to store the value 136 (Base10) by the binary value of 10001000.

Metric Prefixes

Kilo refers to 1000 or 10^3 units. However since Binary uses a base 2 system the smallest whole placed value above 1000 is 1024 or 2^10. This is 10 bytes places.

Mega 10^6 which is 1000 KiloUnits. Therefore 1 Megabyte is 1024 or 2^10 Kilobytes.

Giga 10^9 which is 1000 MegaUnits. Therefore 1 Gigabyte is 1024 or 2^10 Megabytes.

Tera 10^12 which is 1000 GigaUnits. Therefore 1 Terabyte is 1024 or 2^10 Gigabytes.

Peta 10^15 which is 1000 TeraUnits. Therefore 1 Petabyte is 1024 or 2^10 Terabytes.

Exa 10^18 which is 1000 PetaUnits. Therefore 1 Exabyte is 1024 or 2^10 Petabytes.