Why computers use binary
- Computers are made of switches (transistors) that are either on or off, so data is stored as 1s and 0s called bits.
- 4 bits = 1 nibble. 8 bits = 1 byte.
Binary place values
- For 8 bits the place values are 128, 64, 32, 16, 8, 4, 2, 1.
- 1011 0101 = 128 + 32 + 16 + 4 + 1 = 181.
- The largest 8-bit number is 255, so 8 bits can store 256 different values (0 to 255).
Denary to binary
- Start with the largest place value that fits, subtract it, and repeat.
- 100 = 64 + 32 + 4, so 100 = 0110 0100.
Hexadecimal
- Hexadecimal is base 16. It uses 0–9 and A–F (A = 10, B = 11 … F = 15).
- Each hex digit represents one nibble: 1010 1111 = AF.
- Hex is easier for people to read and write than long binary numbers, with fewer mistakes.
Units of data
- bit → nibble (4 bits) → byte (8 bits) → kilobyte (1000 bytes) → megabyte → gigabyte → terabyte → petabyte, each ×1000.
- (Edexcel) Edexcel uses binary prefixes instead: 1 kibibyte (KiB) = 1024 bytes, 1 mebibyte (MiB) = 1024 KiB, then gibibytes (GiB) and tebibytes (TiB), each × 1024.
Key terms
- Bit
- A single binary digit: 0 or 1.
- Nibble
- 4 bits.
- Kibibyte
- 1024 bytes (KiB), the binary prefix used by Edexcel.
- Byte
- 8 bits.
- Binary
- Base 2: numbers written using only 0 and 1.
- Denary
- Base 10: the everyday number system.
- Hexadecimal
- Base 16, using 0–9 and A–F.
- Overflow
- When a calculation's result needs more bits than are available.