Convert between binary, octal, decimal, and hexadecimal instantly. Type in any field and all others update live.
| Dec | Bin | Oct | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 8 | 1000 | 10 | 8 |
| 16 | 10000 | 20 | 10 |
| 64 | 1000000 | 100 | 40 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 65536 | 10000000000000000 | 200000 | 10000 |
Computers use binary because transistors — the fundamental building blocks — have two states: on (1) and off (0). This maps perfectly to binary. Everything a computer does, from adding numbers to displaying images, ultimately reduces to manipulating sequences of 0s and 1s.
Hex is used because one hex digit represents exactly 4 binary bits (a nibble), so two hex digits = one byte. This makes it far more human-readable than binary while still mapping cleanly to how computers work internally. It's widely used for memory addresses, colours (#FF6600), and byte-level data.
Each binary digit represents a power of 2, starting from the right. For 1011: (1×8) + (0×4) + (1×2) + (1×1) = 11. The tool does this instantly for any number.
Octal was historically used in older computing systems. Today it's most commonly seen in Unix/Linux file permissions (e.g., chmod 755 means rwxr-xr-x). Each octal digit represents exactly 3 binary bits.
JavaScript uses 64-bit floating-point numbers (IEEE 754), which means integers are exact up to 2^53 − 1 (about 9 quadrillion). Beyond that, precision may be lost. For very large numbers, use a dedicated big-integer library.