Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal instantly.
Quick presets
Conversions
Invalid number for the selected base.
Common Values
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 16 | 10000 | 20 | 10 |
| 42 | 101010 | 52 | 2A |
| 255 | 11111111 | 377 | FF |
| 1024 | 10000000000 | 2000 | 400 |
| 65535 | 1111111111111111 | 177777 | FFFF |
Click a row to load that value.
Number Bases
- Binary (Base 2) — digits 0-1, used in computing
- Octal (Base 8) — digits 0-7, Unix file permissions
- Decimal (Base 10) — digits 0-9, everyday numbers
- Hexadecimal (Base 16) — digits 0-F, colors and memory addresses
Frequently Asked Questions
What are the common number bases and when are they used?
Binary (base-2) is used by computers internally. Octal (base-8) was used in early computing. Decimal (base-10) is everyday human counting. Hexadecimal (base-16, using 0–9 and A–F) is widely used in programming for colors (#FF0000), memory addresses, and byte values.
How do I convert decimal to binary?
Repeatedly divide the number by 2 and record the remainders from bottom to top. For example, 42 in binary: 42/2=21 r0, 21/2=10 r1, 10/2=5 r0, 5/2=2 r1, 2/2=1 r0, 1/2=0 r1. Reading remainders bottom-up: 101010.
Why do programmers use hexadecimal?
Hexadecimal compactly represents binary data: each hex digit maps to exactly 4 binary digits. This makes it easy to read memory addresses and byte values. For example, the binary number 11111111 is FF in hex and 255 in decimal. Colors use hex pairs for red, green, and blue channels (#RRGGBB).