All data in a computer is stored as binary (0s and 1s). Electronic circuits have two states — off (0) and on (1) — making binary the natural language of computing.
Storage Units
Unit
Abbreviation
Size
Real-world Example
Bit
b
Single 0 or 1
One switch on/off
Nibble
—
4 bits
One hex digit
Byte
B
8 bits
One character e.g. 'A'
Kilobyte
KB
1,024 B
Short text message
Megabyte
MB
1,024 KB
A digital photo
Gigabyte
GB
1,024 MB
An HD film
Terabyte
TB
1,024 GB
Laptop hard drive
Petabyte
PB
1,024 TB
Large data centre
Each unit is 1,024× larger than the previous because 2¹⁰ = 1,024.
🔢 Denary ↔ 8-bit Binary
Denary (base 10) is our everyday number system. Binary (base 2) uses only 0 and 1. Conversion uses column weights that are powers of 2.
Max 8-bit value = 255 (11111111). If the result exceeds 255, a 9th bit is needed but lost — this is an overflow error. The stored result will be incorrect.
11111111 (255) + 00000001 (1)
= 100000000 → 9th bit lost!
Stored result = 00000000 (0) ← OVERFLOW
🔡 Denary ↔ Hexadecimal
Hex (base 16) uses 16 symbols: 0–9 and A–F. It compactly represents binary because each hex digit = exactly 4 bits (a nibble).
Hex Reference
00
11
22
33
44
55
66
77
88
99
A10
B11
C12
D13
E14
F15
Example: 200 → Hex
200 ÷ 16 = 12 rem 8 → C8 ∴ 200 = C8
Example: A3 → Denary
A=10 → 10×16=160 | 3×1=3 160+3 = 163
🔄 Binary ↔ Hexadecimal
Split 8-bit binary into two nibbles of 4 bits. Convert each nibble separately — this is why hex is so useful in computing!