>_

Binary to Decimal

Type a binary number below to get the decimal value — other bases are shown too. The manual method is explained further down.

Try it

Custom base

Two’s complement

How to convert by hand

Multiply each digit by 2 raised to its position, counting from 0 on the right:
1011 = 1×2^3 + 0×2^2 + 1×2^1 + 1×2^0
= 1×8 + 0×4 + 1×2 + 1×1
= 11

Reference table

Binary → Decimal

0 0
1 1
10 2
11 3
100 4
101 5
110 6
111 7
1000 8
1001 9
1010 10
1011 11
1100 12
1101 13
1110 14
1111 15
10000 16
100000 32
1000000 64
1100100 100
1111111 127
10000000 128
11111111 255
100000000 256
1111101000 1000
10000000000 1024
1000000000000 4096
1111111111111111 65535

In code

JavaScript

parseInt('1011', 2) // 11

Python

int('1011', 2)  # 11

More examples

Open the full Number Base Converter →