Octal-Hex-Binary-Base10? Numbering Systems Explained
A Brief History of Computers and Number Systems
Computers, at their core, are just a bunch of tiny switches flipping on and off at incredible speeds.
Before we had the fancy machines of today, early computers like the PDP-8, PDP-11, and other legendary machines used primitive yet powerful techniques to store and manipulate data.
These machines had address buses that were only 8-bit, 12-bit, or 16-bit, meaning they could only address a limited amount of memory.
Wires and Binary: Why Computers Think in 1s and 0s
Inside a computer, everything is just electricity—either the voltage is there (1
), or it isn’t (0
).
Since we can’t have three, four, or infinite voltage states, early engineers had to use base 2 (binary) to express numbers using wires and transistors.
For example, the number 5
in binary is:
|
|
Each column represents a power of two:
|
|
Why Hexadecimal?
As computers got more powerful, engineers realized that writing everything in binary was a nightmare. So, they switched to hexadecimal (base 16) to represent numbers in a more compact way.
Instead of:
|
|
You could write:
|
|
Hexadecimal uses 16 symbols:
|
|
where A = 10
, B = 11
, C = 12
, and so on.
Base 10: Because We Have 10 Fingers
Humans use base 10 because we have 10 fingers (unless you’re an alien from Rendezvous with Rama—more on that later). In decimal (base 10), each place value increases by a power of 10:
|
|
Octal: The Forgotten Base
Octal (base 8) was heavily used in early computing, especially with machines like the PDP-8, because it neatly fit into 3-bit chunks. Each octal digit represents three binary bits:
|
|
That made things easier for engineers working with older computer hardware.
Rendezvous with Rama: Aliens Who Hate Base 10?
In Rendezvous with Rama, Arthur C. Clarke describes a spaceship where the aliens use base 8 (octal) instead of base 10. Why? Because they likely had 8 fingers, and their whole numbering system evolved around that. This makes us wonder: If humans had 12 fingers, would we be using base 12 today?
Number Systems in Computer Graphics
Early computer graphics relied on binary and hexadecimal to define pixel colors, memory addresses, and image data.
For example, colors in RGB (Red-Green-Blue) are often represented in hexadecimal:
|
|
Each pair represents a byte (8-bit) value for red, green, and blue.
Why Does This Matter in Modern Programming?
- Hexadecimal is widely used in memory addressing and debugging.
- Octal is still seen in file permissions in Unix/Linux (
chmod 755
). - Binary is essential for bitwise operations, encryption, and low-level programming.
How Does This Relate to TCP/IP Subnet Masking?
Subnet masks use binary place values to define network portions:
|
|
Understanding binary makes networking and IP addressing much easier.
Key Ideas
Concept | Explanation |
---|---|
Binary (Base 2) | Used by computers, based on 1s and 0s |
Hexadecimal (Base 16) | Compact way to represent binary values |
Octal (Base 8) | Used in early computers, still in UNIX file permissions |
Decimal (Base 10) | The system we use daily, based on our fingers |
Alien Math | Rendezvous with Rama aliens used base 8 |
Subnet Masking | Uses binary place values for network segmentation |
Computer Graphics | Uses hexadecimal for colors and pixel data |