Binary to Decimal

A binary number works by powers of two: each 1 bit adds its position weight, so 1010 means 8 + 2 = 10. This converter does that sum for you in both directions. Paste a single binary or decimal number, pick the direction, and read the converted value instantly. Handy for checking homework answers, decoding a bit flag, or confirming what a debugger prints.

How the converter works

  1. 1

    Enter one number

    Type a single binary number (only 0s and 1s) or a single decimal number (only digits). Leading zeros are fine, but spaces, underscores, or a second value are not accepted.

  2. 2

    Pick the direction

    Binary to Decimal interprets the input as unsigned base-2. Decimal to Binary converts a plain integer back into its binary form.

  3. 3

    Read the result

    The converted value appears next to the input. In binary mode each `1` bit contributes its position weight, so `1010` becomes 8 + 2 = 10.

  4. 4

    Copy or convert again

    Use the copy button to grab the result, or change the input and the conversion updates immediately.

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 binary 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. The converter has no signed mode and no width selector, so interpret signed values yourself or use a dedicated signed tool.

Precision limits

Values up to 63 bits convert exactly. Bigger inputs are handled with floating-point arithmetic, so the last digits of very large values may lose precision, and a 64-bit value with the top bit set is read as unsigned.

Frequently Asked Questions

In binary mode only the digits 0 and 1 are accepted. Spaces, underscores, letters, or punctuation make the input invalid and no result is shown. In decimal mode only the digits 0 to 9 are accepted.

Values up to 63 bits convert exactly. Larger inputs are converted with floating-point arithmetic and may lose precision, so double-check very large results, especially 64-bit values with the top bit set.

Because the converter interprets binary as unsigned. Under two’s complement, 11111111 in an 8-bit word means -1; to get that reading, compute the signed interpretation yourself or use a tool with signed modes.

No, the converter accepts one value at a time. Convert each number separately, or use a spreadsheet function such as BIN2DEC for bulk conversion.

Related Tools

Tool available in other languages