Skip to content
LoveToCalc

Binary to decimal converter

Type a number, say which base it is written in, and see it in binary, octal, decimal and hexadecimal at once, with the working.

Digits 0-9 then A-Z (base 36 at most). A leading minus is read; spaces and underscores group digits; a point or comma starts the fraction.

Try:

Result

1011012 = 4510

In every common base

Binary (2)
101101
Octal (8)
55
Decimal (10)
45
Hexadecimal (16)
2D

Sum of digit × place value

Each digit is multiplied by the base raised to its position, counted from 0 on the right, and the products are added.

  1. 1 · 25 = 1 · 32 = 32
  2. 0 · 24 = 0 · 16 = 0
  3. 1 · 23 = 1 · 8 = 8
  4. 1 · 22 = 1 · 4 = 4
  5. 0 · 21 = 0 · 2 = 0
  6. 1 · 20 = 1 · 1 = 1

Sum: 4510

The target is decimal, so the positional sum above is the whole conversion.

Two’s complement

How a computer stores the whole number 45 in 8, 16 and 32 bits. A negative number is its positive form with every bit flipped and 1 added.

BitsBinaryHex
8001011012D
160000000000101101002D
32000000000000000000000000001011010000002D

Working at 8 bits

A non-negative number that fits is its plain binary form, padded with zeros to 8 bits: 00101101.

How to use it

Two ways to convert

To decimal: add digit times place value. In binary the places are 1, 2, 4, 8, 16, so 101101 = 32 + 8 + 4 + 1 = 45.

From decimal: divide repeatedly. Divide by the new base, keep each remainder, and continue with the quotient until it is 0. Reading the remainders from the last to the first gives the digits: 45 gives 1, 0, 1, 1, 0, 1 read upwards, so 45 = 101101 in binary.

Two’s complement

Computers store negative whole numbers by flipping every bit of the positive number and adding 1. At 8 bits, −5 starts as 00000101, flipped 11111010, plus one 11111011 (FB). An n-bit signed number holds −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1: −128 to 127 at 8 bits.

Common questions

Why does 0.1 never end in binary? A fraction ends in a base only if its denominator divides a power of that base. 1/10 has the factor 5, which no power of 2 has, so the binary digits repeat. The converter cuts the expansion rather than rounding it.

Last reviewed October 20, 2026 ·How pages are reviewed

All math calculators

Put this calculator on your site

Copy the code into your page where the calculator should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.