Most people count in base 10 — decimal. But computers think in base 2, programmers often write in base 16, and Unix file permissions use base 8. Understanding these number systems makes you a better developer.
The Four Number Systems
Decimal (Base 10) — digits 0 to 9, the system everyone uses daily. Example: 255
Binary (Base 2) — digits 0 and 1, the native language of computers. Every piece of data is ultimately binary. Example: 11111111 which equals 255
Hexadecimal (Base 16) — uses 0 to 9 and A to F. Each hex digit represents 4 binary bits, making it compact for memory addresses, color codes, and hashes. Example: FF which equals 255
Octal (Base 8) — uses 0 to 7, still used in Unix file permissions. Example: 377 which equals 255
Why Hexadecimal?
Hex is a compact representation of binary. One byte fits exactly in two hex digits, making hex essential for memory addresses like 0x7ffee4b2, color codes like #FF5733, SHA256 hashes, and MAC addresses.
Unix File Permissions in Octal
When you run chmod 755, that is octal: 7 meaning read, write and execute for owner; 5 meaning read and execute for group; 5 meaning read and execute for others. Each digit maps to 3 binary bits.
Quick Conversion Reference
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 00010000 | 10 | 20 |
| 255 | 11111111 | FF | 377 |
Convert Between Number Systems Free
Use the Anonymiz Number Base Converter. Enter a number in any base — binary, decimal, hex, or octal — and instantly see the equivalent in all others. No math required.