Free Number Base Converter
Convert between binary, decimal, hexadecimal and octal — type in any field and all others update instantly.
Number base conversion is fundamental in computer science, electronics and programming. Binary (base 2) is how computers process data, hexadecimal (base 16) is used for memory addresses, colour codes and bytecode, and octal (base 8) appears in Unix file permissions. Type in any field and all other bases update instantly. The bit breakdown visualises the binary structure of your number.
Click any field result to copy to clipboard.
Binary bit breakdown
Quick Reference
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 8 | 1000 | 8 | 10 |
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 10000 | 10 | 20 |
| 32 | 100000 | 20 | 40 |
| 64 | 1000000 | 40 | 100 |
| 128 | 10000000 | 80 | 200 |
| 255 | 11111111 | FF | 377 |
Number Bases Explained
Decimal (base 10) is what we use daily — digits 0-9. Binary (base 2) uses only 0 and 1, the language computers operate in. Hexadecimal (base 16) uses 0-9 and A-F — widely used in programming, memory addresses and web colour codes (#FF5733). Octal (base 8) uses digits 0-7, still used in Unix file permissions.
Understanding number bases is essential in computer science, low-level programming, digital electronics and cryptography. A single byte (8 bits) can hold values from 0 (00000000) to 255 (11111111) in binary, or 0x00 to 0xFF in hex.
Why Hexadecimal Exists, and Where Each Base Appears
A positional numeral system encodes a value as digits multiplied by powers of its base. In decimal, 254 means 2×10² + 5×10¹ + 4×10⁰. In binary the same value is 11111110, and in hexadecimal it is FE. Nothing about the quantity changes — only the notation.
Binary is fundamental because a transistor is either conducting or not, giving two states and therefore base 2. But binary is unreadable in bulk: a single 32-bit value is a 32-character string of ones and zeros that no one can check by eye. Hexadecimal solves this through an exact relationship — 16 is 2⁴, so every hex digit corresponds to precisely four binary digits, with no rounding or ambiguity. One byte is always exactly two hex digits. This is why memory addresses, colour codes, hashes and byte dumps are written in hex: it is binary at a quarter of the length, and converting between the two is mechanical rather than arithmetic.
You meet each base in predictable places. Hex appears in CSS colours (#FF8800 is three bytes: red 255, green 136, blue 0), MAC addresses, memory addresses, and any checksum or hash. Binary shows up in permission bits, bitmask flags and network subnet masks. Octal — base 8, three bits per digit — survives almost exclusively in Unix file permissions, where chmod 755 encodes three groups of three permission bits.
Two details cause most confusion. Bit width is not implied by the value: 255 is 11111111 in 8 bits and 0000000011111111 in 16, the same number with different padding, which matters when a protocol specifies a field size. And negative numbers are normally stored in two's complement, where the leading bit indicates sign and −1 in 8 bits is 11111111 — indistinguishable from 255 unless you already know how the value is meant to be interpreted.