A number base converter converts between binary, octal, decimal, and hexadecimal number systems.
Convert numbers between binary, octal, decimal, and hexadecimal in real time as you type.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 127 | 1111111 | 177 | 7F |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 1024 | 10000000000 | 2000 | 400 |
| 4095 | 111111111111 | 7777 | FFF |
A number base (or radix) is the number of unique digits used to represent numbers in a positional numeral system. Binary (base 2) uses 0-1, octal (base 8) uses 0-7, decimal (base 10) uses 0-9, and hexadecimal (base 16) uses 0-9 and A-F.
Each binary digit represents a power of 2. For example, 1101 in binary = 1×8 + 1×4 + 0×2 + 1×1 = 13 in decimal. Start from the rightmost bit (2^0) and multiply each bit by its corresponding power of 2.
Hexadecimal (base 16) is used because it provides a compact representation of binary data. Each hex digit represents exactly 4 bits, making it easy to convert between binary and hex. It is commonly used for memory addresses, color codes (#FF0000), and MAC addresses.
Repeatedly divide the decimal number by 2 and record the remainders. Read the remainders from bottom to top. For example, 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Reading bottom-up: 1101.
Octal is a base-8 number system using digits 0-7. Each octal digit represents exactly 3 binary digits. Octal was historically used in computing (e.g., Unix file permissions use octal: 755 = rwxr-xr-x).