Free Online Tool Updated July 2026

Binary to Decimal Converter — How to Convert Binary to Decimal

A complete guide to binary-to-decimal conversion with the positional notation formula, an 8-bit reference table, step-by-step worked examples, and code in Python, JavaScript, C, and Java.

Try it: Binary to Decimal mini-calculator

Decimal Result: 21
Popular Conversions (Click to test):

Popular Binary to Decimal (Base 2 to Base 10) Reference Table

Below is an instant lookup table answering top search queries like convert from binary to base 10, binary 2 decimal, and binary solver. Click any row to load the exact conversion into the calculator above.

Binary String (Base 2) Decimal Value (Base 10) Power of Two Formula Meaning / Usage
10 8 + 2 = 10 Standard decimal base number
255 2⁸ - 1 = 255 Maximum 8-bit unsigned integer
128 2⁷ = 128 Midpoint of 8-bit unsigned range
170 128 + 32 + 8 + 2 = 170 Alternating bit test pattern

Understanding positional notation.

The binary system is a base-2 number system representing values using only two digits: 0 and 1. The decimal system is a base-10 system using ten digits (0-9). If you want to perform the opposite calculation, you can use our dedicated decimal to binary converter.

To convert from binary to decimal, we use the positional notation method. Each digit in a binary number represents a power of 2, starting with 20 on the far right (least significant bit) and increasing by a power of one as you move left. For negative values, see how to convert signed binary to decimal, or learn how to group bits to convert binary to hexadecimal directly.

The conversion formula.

For any binary number with n digits, the conversion formula is:

Decimal = (d₀ × 2⁰) + (d₁ × 2¹) + (d₂ × 2²) + ... + (dₙ₋₁ × 2ⁿ⁻¹)

Where d0 is the rightmost digit, d1 is the second digit from the right, and so on.

Step-by-step binary to decimal conversion examples.

Binary to decimal in code.

Python
binary_to_decimal.py
print(int("1011", 2))      # 11
print(int("11111111", 2))  # 255
print(int("10000000", 2))  # 128
print(int("10101", 2))     # 21
JavaScript
binaryToDecimal.js
parseInt("1011", 2);      // 11
parseInt("11111111", 2);  // 255
parseInt("10000000", 2);  // 128
// Or using BigInt for large values:
Number(BigInt("0b" + "11111111")); // 255
C
binary_to_decimal.c
#include <stdio.h>
#include <stdlib.h>
int main() {
    printf("%ld\n", strtol("1011", NULL, 2));      // 11
    printf("%ld\n", strtol("11111111", NULL, 2));  // 255
    return 0;
}
Java
BinaryToDecimal.java
System.out.println(Integer.parseInt("1011", 2));      // 11
System.out.println(Integer.parseInt("11111111", 2));  // 255
System.out.println(Integer.parseInt("10000000", 2));  // 128

Frequently Asked Questions

How do you convert binary to decimal?

To convert binary to decimal, multiply each binary digit (0 or 1) by 2 raised to the power of its position index (starting at 0 on the far right). Finally, sum all these products to get the decimal equivalent.

What is 11111111 in decimal?

Binary 11111111 = decimal 255. It is the maximum value of an 8-bit unsigned integer: 128+64+32+16+8+4+2+1 = 255 = 2⁸-1.

What is 10000000 in decimal?

Binary 10000000 = decimal 128 (only bit 7 is set: 2⁷ = 128). In 8-bit signed Two's Complement, 10000000 represents -128.

What is the decimal equivalent of binary 1111?

Binary 1111 = decimal 15: (1×2³) + (1×2²) + (1×2¹) + (1×2⁰) = 8+4+2+1 = 15.

How does signed binary to decimal conversion work?

For signed numbers in 8-bit Two's Complement, the MSB (leftmost bit) is the sign bit. If MSB=1, the number is negative. To find its value: invert all bits, add 1, convert to decimal, and prepend a minus sign. See our signed binary to decimal converter.

8-Bit Binary to Decimal Chart

BinaryDecimal
0000 00011
0000 101010
0001 000016
0100 000064
0111 1111127
1000 0000128
1010 1010170
1111 1111255

Powers of 2 Reference

Bit2ⁿValue
Bit 02⁰1
Bit 12
Bit 24
Bit 38
Bit 42⁴16
Bit 52⁵32
Bit 62⁶64
Bit 72⁷128
Bit 82⁸256
Bit 92⁹512
Bit 102¹⁰1024

Explore Other Popular Converters