Convert numbers between binary, octal, decimal, and hexadecimal in real time.
Common Conversions
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
About Number Bases
Number bases (or radixes) define how many unique digits are used to represent numbers. Binary (base 2) uses only 0 and 1 and is the foundation of all digital computing. Octal (base 8) was historically used in early computing systems. Decimal (base 10) is the standard system in everyday life. Hexadecimal (base 16) is widely used in programming because it provides a compact representation of binary data — one hex digit maps to exactly four binary digits.
FAQ
How do I convert binary to decimal?
Each binary digit represents a power of 2, starting from the right. For example, 1011 in binary = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal.
Why is hexadecimal used in programming?
Hexadecimal is popular because each hex digit corresponds to exactly 4 binary bits. This makes it easy to represent large binary values compactly — for example, the byte 11111111 is simply FF in hex.
What is octal used for?
Octal is commonly used in Unix/Linux file permissions (e.g., chmod 755) and was historically used in older computing systems. Each octal digit represents exactly 3 binary bits.
Can this tool handle very large numbers?
Yes. This converter uses BigInt internally, so it can accurately convert numbers of arbitrary size without precision loss.
What characters are valid for each base?
Binary: 0 and 1. Octal: 0–7. Decimal: 0–9. Hexadecimal: 0–9 and a–f (case-insensitive).