After years of knowing about number bases, I finally understood them. I learned all of this in school: base 2, base 10, base 16. But memorizing it for an exam is very different from understanding why people actually use these systems. We have 10 fingers, so why would anyone invent another base?
Why computers use base 2
Binary maps almost perfectly onto hardware. A transistor is either off or on, so 0 means no current is flowing and 1 means current is flowing. Two states are easy to build and easy to tell apart, which makes them reliable.
From there, everything is combinations. One bit is a 0 or a 1. Eight bits make a byte, which gives ²⁸ = 256 possible combinations. A kilobyte is ²¹⁰ = 1,024 bytes, which is 8,192 bits. (Strictly, the 1,024 version is a kibibyte, and a kilobyte in SI units is 1,000 bytes, but 1,024 is how it's traditionally used.)
Why hexadecimal exists
Hex is a way for humans to read binary. Binary is precise but painful to look at: 11111111 is hard to scan, and long strings are worse. Hex uses 16 symbols, 0–9 and then A-F for 10–15. Since 16 is ²⁴, one hex digit represents exactly 4 bits, so a byte is always exactly two hex digits. 11111111 becomes FF, and the conversion is mechanical, with no arithmetic needed.
That was the "aha" for me: bases aren't arbitrary. Each one exists because it fits something. Base 10 fits our hands, base 2 fits transistors, and base 16 fits the gap between machines and the people reading their output.
Top comments (0)