Binary to decimal

Convert binary to decimal as you type, with any number of digits, the method step by step and a reference table.

loading Binary to decimal
About this tool

Binary and decimal

Binary (base 2) is how hardware stores every number: each digit is a bit, worth a power of 2. Decimal (base 10) is the everyday system: each digit is worth a power of 10.

Students meet it in their first programming or digital electronics class; developers use it to read bit flags, masks and register values.

This page opens the base converter with binary as the input; it shows binary, octal, decimal, hexadecimal and Base64 at once, accepts prefixes such as 0x, 0b and 0o, and works with numbers of any length (no 2^53 limit). It runs in your browser.

Binary vs decimal

Binarydecimal
Base210
Digits0 10–9
Prefix in code0b—
255 is written11111111255

How to convert binary to decimal by hand

Multiply each digit by the power of 2 of its position (counting from 0 on the right) and add everything. For 10011100:

1 × 2^7 + 0 × 2^6 + 0 × 2^5 + 1 × 2^4 + 1 × 2^3 + 1 × 2^2 + 0 × 2^1 + 0 × 2^0
= 128 + 0 + 0 + 16 + 8 + 4 + 0 + 0
= 156

Binary to decimal table

Values computed by the converter itself:

BinaryDecimal
00
11
102
1117
10008
101010
111115
1000016
10000032
100000064
1100100100
1111111127
11111111255
100000000256
11111010001000
100000000001024
10000000000004096
111111111111111165535

Binary to decimal in code

JavaScript

parseInt('10011100', 2); // 156

Python

int("10011100", 2)  # 156

For integers beyond 2^53 in JavaScript, use BigInt: BigInt("0x…").toString(10).

Frequently asked questions

Does it handle very large numbers?

Yes. The converter uses arbitrary-precision integers (BigInt), so a 256-bit hash or a 100-digit number converts exactly; JavaScript Number would lose digits above 2^53.

Can I convert negative numbers or fractions?

Negative integers keep their sign (-255 → -FF); the tool does not write two’s complement or fractional digits. For a two’s complement byte, add 256 first (−1 → 255 → FF).

Why do programmers use hexadecimal instead of binary?

Because it is binary in short form: 4 bits per digit, 2 digits per byte, so 0xFF is easier to read than 11111111 and still maps bit for bit.

Report a problem