The binary number system is a way of writing numbers with only 1s and 0s.

Everything on a computer (text, images, apps, etc.) is stored in binary.

Computers use 1s and 0s to represent ON and OFF:
  1 means the electricity is flowing (ON)
  0 means the electricity isn't flowing (OFF)


A single binary digit (either a 1 or a 0) is called a bit.
A group of four bits is called a nibble, and a group of eight bits (or two nibbles) is called a byte.


Just like 1000 metres is a kilometre, 1000 bytes is a kilobyte.
 

Table 1 shows the more common prefixes used when describing memory usage.

Table 1

Unit Number of bytes
Kilobyte (kB) 103 = 1,000 bytes
Megabyte (MB) 106 = 1,000,000 bytes
Gigabyte (GB) 109 = 1,000,000,000 bytes
Terabyte (TB) 1012 = 1,000,000,000,000 bytes

Table 2 shows the less common prefixes used when describing memory usage.

Table 2

Unit Number of bytes
Kibibyte (KiB) 210 = 1,024 bytes
Mebibyte (MiB) 220 = 1,048,576 bytes
Gibibyte (GiB) 230 = 1,073,741,824 bytes
Tebibyte (TiB) 240 = 1,099,511,627,776 bytes


If each bit can take 2 possible values (1 or 0), how many possible values can a nibble take?

Each bit in the nibble can take 2 possible values, so the nibble can take 24 = 2 × 2 × 2 × 2 = 16 possible values.