Binary to Decimal Converter

Binary, decimal, hexadecimal and octal, with the working shown.

Binary → decimal

1×23 + 0×22 + 1×21 + 1×20

= 8 + 0 + 2 + 1 = 11

Decimal → binary

11 ÷ 2= 5remainder 1
5 ÷ 2= 2remainder 1
2 ÷ 2= 1remainder 0
1 ÷ 2= 0remainder 1

Read the remainders from bottom to top: 1011

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)

DecimalBinaryOctalHex
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
17100012111
18100102212
19100112313
20101002414
21101012515
22101102616
23101112717
24110003018
25110013119
2611010321A
2711011331B
2811100341C
2911101351D
3011110361E
3111111371F
321000004020

Binary to decimal in Python and Excel

WhereBinary → decimalDecimal → binary / hex
Pythonint("1011", 2)bin(11), hex(255)
JavaScriptparseInt("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.

Frequently asked questions

What is 1011 in decimal?

11 (8 + 2 + 1).

What is 255 in binary?

11111111, the largest value of one byte. In hex it is FF.

How many bits do I need for a number?

n bits cover 0 to 2ⁿ − 1, so 8 bits reach 255 and 16 bits reach 65,535.

Can I type 0x or 0b prefixes?

Yes. 0x in the hex box and 0b in the binary box are ignored, as are spaces and underscores.