How do you convert binary to decimal?
Multiply each bit by its power of 2 and add the results. From the right, the place values are 1, 2, 4, 8, 16 and so on. For 1011: 1×8 + 0×4 + 1×2 + 1×1 = 11.
How do you convert decimal to binary?
Divide by 2 repeatedly and write down the remainders, then read them from the last to the first. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1, so 13 is 1101. The converter shows these steps for any number you type.
How do you convert hex to decimal?
Each hex digit is worth a power of 16, with A–F standing for 10–15. FF = 15×16 + 15 = 255, and 1A3 = 1×256 + 10×16 + 3 = 419. Going the other way, each hex digit equals exactly 4 binary digits, so F = 1111.
Binary to decimal chart (0–32)
| 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 |
| 17 | 10001 | 21 | 11 |
| 18 | 10010 | 22 | 12 |
| 19 | 10011 | 23 | 13 |
| 20 | 10100 | 24 | 14 |
| 21 | 10101 | 25 | 15 |
| 22 | 10110 | 26 | 16 |
| 23 | 10111 | 27 | 17 |
| 24 | 11000 | 30 | 18 |
| 25 | 11001 | 31 | 19 |
| 26 | 11010 | 32 | 1A |
| 27 | 11011 | 33 | 1B |
| 28 | 11100 | 34 | 1C |
| 29 | 11101 | 35 | 1D |
| 30 | 11110 | 36 | 1E |
| 31 | 11111 | 37 | 1F |
| 32 | 100000 | 40 | 20 |
Binary to decimal in Python and Excel
| Where | Binary → decimal | Decimal → binary / hex |
|---|---|---|
| Python | int("1011", 2) | bin(11), hex(255) |
| JavaScript | parseInt("1011", 2) | (11).toString(2) |
| Excel | =BIN2DEC("1011"), =HEX2DEC("FF") | =DEC2BIN(11), =DEC2HEX(255) |
Excel's BIN2DEC only accepts up to 10 bits; this converter has no practical limit because it uses arbitrary-precision integers.
What about negative numbers and fractions?
This converter handles non-negative whole numbers. Computers store negative integers in two's complement and fractions in floating point, which depend on the number of bits used.
Sources: Microsoft Support, BIN2DEC function. Checked October 2026.