Binary, Octal, Decimal, Hexadecimal: Numeral Systems Explained

Numeral systems (bases) define how many unique digits are used to represent numbers. The decimal system (base-10) is our everyday system, but computers use binary (base-2), and programmers routinely work with octal (base-8) and hexadecimal (base-16).

Decimal (base-10) uses digits 0–9. Each position represents a power of 10. The number 253 means 2×10² + 5×10¹ + 3×10⁰ = 200 + 50 + 3. This is the system humans use naturally, likely because we have 10 fingers.

Binary (base-2) uses only 0 and 1. Each position is a power of 2. The binary number 1011 = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal. Computers use binary because digital circuits have two stable states: on (1) and off (0).

Octal (base-8) uses digits 0–7. Each octal digit represents 3 binary bits. Used primarily for Unix/Linux file permissions: chmod 755 means rwxr-xr-x, where 7 = 111 (read+write+execute) and 5 = 101 (read+execute).

Hexadecimal (base-16) uses 0–9 and A–F (A=10 through F=15). Each hex digit represents 4 binary bits. Used for color codes (#FF5733), memory addresses, MAC addresses, and binary data representation. Two hex digits represent one byte (00–FF = 0–255).

Use Tooler's Number Base Converter to instantly convert between binary, octal, decimal, and hexadecimal.