Binary to decimal converter

Type a binary number to see its decimal value — or a decimal number to see its binary form — with the powers-of-two expansion worked out below. 0b prefixes, spaces and underscores are accepted.

Step by step

Type a number above to see the conversion worked out step by step.

How binary to decimal conversion works

Binary is base 2: each position is worth a power of two, doubling from right to left — 1, 2, 4, 8, 16, and so on. Add up the values of the positions holding a 1:

101011₂ = 1×2⁵ + 0×2⁴ + 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 32 + 8 + 2 + 1 = 43₁₀

Decimal to binary works by dividing by 2 repeatedly and reading the remainders from bottom to top — the converter shows those division steps for your number.

First powers of two

2ⁿValue2ⁿValue
2⁰12⁵32
22⁶64
42⁷128
82⁸256
2⁴162¹⁰1024

Related tools and guides