Binary to Decimal Converter

Free online binary to decimal converter with step-by-step explanation. Convert any binary number to decimal and see the sum of the powers of 2.

Accepts spaces and the 0b prefix — only the digits 0 and 1 are valid.
Quick Value Selection
Decimal Result (Base 10):
255

About this tool

The binary system (base 2) uses only the digits 0 and 1 and is the native language of electronic circuits and computers, while the decimal system (base 10) is the standard of everyday mathematics. This tool translates any sequence of bits into the corresponding decimal value and shows in detail the two classic conversion methods: the sum of the powers of 2 and the doubling method.

Step-by-Step Resolution (Sum of the Powers of 2)

Each bit is worth the power of 2 matching its position. The table below uses the binary number entered in the input field, multiplying each bit by its weight and adding up the contributions:

BitPower (2^n)Value (Weight)Contribution
1271281 × 128 = 128
126641 × 64 = 64
125321 × 32 = 32
124161 × 16 = 16
12381 × 8 = 8
12241 × 4 = 4
12121 × 2 = 2
12011 × 1 = 1
Sum of the contributions (decimal result):255

Doubling Method

A practical alternative for converting in your head: start from the leftmost bit, double the running total and add the next bit until the end of the sequence:

#BitCalculationRunning Total
110 × 2 + 11
211 × 2 + 13
313 × 2 + 17
417 × 2 + 115
5115 × 2 + 131
6131 × 2 + 163
7163 × 2 + 1127
81127 × 2 + 1255

How to Use the Binary to Decimal Converter

1

Enter the Binary Number

Enter the sequence of bits you want to convert into the input field. You can paste the value with spaces or with the '0b' prefix.

2

See the Decimal Result

The base-10 value appears automatically right below, with no need to click any button.

3

Copy or Explore the Step-by-Step

Click to copy the result, or scroll down to see the sum of the powers of 2 and the doubling method applied to your number.

Practical Applications of Binary Conversion

Reading binary values is an essential skill in computing and digital electronics. See where it's used:

  • Digital Electronics and HardwareInterpreting registers, sensor outputs, and circuit signals that arrive as sequences of bits.
  • Computer Networks and IPTranslating subnet masks and IPv4 octets back into the decimal values used in configuration.
  • Programming and DebuggingChecking the value of bitwise flags and permission masks while debugging code.
  • Studying and ExamsSolving and checking digital logic and computer architecture exercises in courses and exams.

Frequently Asked Questions About Binary to Decimal

What is 11111111 in decimal?

The binary number 11111111 equals 255 in decimal. It's the sum of every power of 2 from 2⁰ to 2⁷ and the largest value representable in an unsigned byte.

What does the '0b' prefix mean before a binary number?

The '0b' prefix (e.g. 0b1010) is a convention used in programming languages (such as JavaScript, Python, and C++) to explicitly indicate that the following numeric sequence is a base-2 number. This converter accepts the prefix and ignores it in the calculation.

What's the largest number 8 bits can represent?

With 8 bits (1 byte) you can represent 256 distinct values, from 0 to 255. Each additional bit doubles the range: 16 bits go from 0 to 65,535 and 32 bits reach 4,294,967,295.

Does the converter accept binary numbers with spaces or grouped in fours?

Yes. Spaces are removed automatically before the calculation, so you can paste grouped values like '1111 1111' and the result will be the same as '11111111'.

Recommended Reading:Wikipedia (Binary Code)

See also