Binary to Decimal

Turn any binary number into its decimal equivalent by summing the powers of two for every 1 bit. The converter accepts numbers of any width — from a single nibble to a 64-bit register dump — and shows the positional expansion so you can double-check homework, reverse-engineer a bit flag, or confirm what a debugger is printing.

How binary to decimal conversion works

  1. 1

    Enter the binary digits

    Leading zeros are fine. Spaces and underscores are stripped so 1010_1100 works the same as 10101100.

  2. 2

    Each bit gets a weight

    Starting from the right, position 0 has weight 2^0 = 1, position 1 has weight 2, position 2 has weight 4, and so on.

  3. 3

    Sum the contributions

    Multiply each bit by its weight and add them up. Zeros contribute nothing; ones contribute their position weight.

  4. 4

    Read the decimal result

    The sum is your decimal number. Copy it, or toggle the breakdown view to see every weight that participated.

Worked example: 1011 0101

Bit position 7 6 5 4 3 2 1 0
Weight 128 64 32 16 8 4 2 1
Bit value 1 0 1 1 0 1 0 1
Contribution 128 0 32 16 0 4 0 1

Total: 128 + 32 + 16 + 4 + 1 = 181

Quick reference by width

  • 4-bit nibble: max value 15
  • 8-bit byte: max value 255
  • 16-bit short: max value 65,535
  • 32-bit int (unsigned): max value 4,294,967,295
  • 64-bit long (unsigned): max value 18,446,744,073,709,551,615

Signed vs unsigned

This converter treats input as unsigned by default. For two’s-complement signed numbers, a leading 1 in a fixed-width word means the value is negative — flip every bit, add one, and negate the result. If you need signed output, pick the width that matches your source (8, 16, 32, or 64 bits).

Frequently Asked Questions

Spaces and underscores are treated as visual separators and ignored. Anything else (letters, punctuation, a stray 2) throws a validation error.

The tool uses arbitrary-precision arithmetic, so there is no practical upper limit. 512-bit hashes and beyond convert cleanly.

Because the converter defaults to unsigned. Switch to an 8-bit signed interpretation and 11111111 becomes -1 under two’s complement.

Yes — one number per line. Each line converts independently and results line up one-to-one for easy copy into a spreadsheet.

Related Tools