How to Convert Binary to Decimal (Step-by-Step with Examples)
The positional method, worked examples (1010, 11111111, 10101010), a left-to-right shortcut, and the mistakes everyone makes at first.
Free forever · No sign-up
Convert any binary number to decimal instantly — with the full step-by-step working shown. Free, fast, no sign-up.
Part of BinDec — 15 free converters for number systems, text encoding & developers.
15 free tools8 languages100% private — runs in your browser
Only 0s and 1s allowed.
Your data stays in your browser.
Shorter inputs are padded with leading zeros; longer inputs keep only the rightmost bits.
| Bit | Position | Value (2n) | Contribution |
|---|
No recent conversions yet.
Example: 1011₂ = (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 8 + 0 + 2 + 1 = 11.
Background reading: the binary number system and two’s complement on Wikipedia.
| Binary | Decimal | Calculation |
|---|---|---|
| 0000 | 0 | 0×8+0×4+0×2+0×1 = 0 |
| 0001 | 1 | 0×8+0×4+0×2+1×1 = 1 |
| 0010 | 2 | 0×8+0×4+1×2+0×1 = 2 |
| 0011 | 3 | 0×8+0×4+1×2+1×1 = 3 |
| 0100 | 4 | 0×8+1×4+0×2+0×1 = 4 |
| 0101 | 5 | 0×8+1×4+0×2+1×1 = 5 |
| 0110 | 6 | 0×8+1×4+1×2+0×1 = 6 |
| 0111 | 7 | 0×8+1×4+1×2+1×1 = 7 |
| 1000 | 8 | 1×8+0×4+0×2+0×1 = 8 |
| 1001 | 9 | 1×8+0×4+0×2+1×1 = 9 |
| 1010 | 10 | 1×8+0×4+1×2+0×1 = 10 |
| 1011 | 11 | 1×8+0×4+1×2+1×1 = 11 |
| 1100 | 12 | 1×8+1×4+0×2+0×1 = 12 |
| 1101 | 13 | 1×8+1×4+0×2+1×1 = 13 |
| 1110 | 14 | 1×8+1×4+1×2+0×1 = 14 |
| 1111 | 15 | 1×8+1×4+1×2+1×1 = 15 |
| Power | Value |
|---|---|
| 20 | 1 |
| 21 | 2 |
| 22 | 4 |
| 23 | 8 |
| 24 | 16 |
| 25 | 32 |
| 26 | 64 |
| 27 | 128 |
| 28 | 256 |
| 29 | 512 |
| 210 | 1024 |
| 211 | 2048 |
| 212 | 4096 |
| 213 | 8192 |
| 214 | 16384 |
| 215 | 32768 |
| 216 | 65536 |
int("1010", 2) # → 10
parseInt("1010", 2); // → 10
#include <stdio.h>
int main(void) {
const char *s = "1010";
int result = 0;
for (int i = 0; s[i] != '\0'; i++)
result = result * 2 + (s[i] - '0');
printf("%d\n", result); /* → 10 */
return 0;
}
1010₂ = 101111₂ = 1511111111₂ = 255 (largest 8-bit value)100000000₂ = 2560₂ = 01111111111111111₂ = 65,535 (largest 16-bit value)Multiply each binary digit by 2 raised to its position power (from 0 at the right) and sum the results. Or just use the converter above — it shows every step.
1010₂ = 10 in decimal.
Yes — it supports binary numbers of any length, including 32-bit, 64-bit and longer, with full precision.
11111111 in binary equals 255 in decimal — the largest value a single byte can hold.
Hardware works with two physical states — on and off — so binary maps directly onto transistors and logic gates.
There is no fixed limit — binary strings of any length are supported with full precision, including 64-bit and longer values.
No. 001010 and 1010 both equal 10 — leading zeros only pad the display.
Tick ‘Signed (two’s complement)’ above and choose the bit width (8, 16, 32 or 64). The top bit then counts as negative: for example, 8-bit 11111111 = −1.
Need the reverse? Try our decimal to binary converter.
The positional method, worked examples (1010, 11111111, 10101010), a left-to-right shortcut, and the mistakes everyone makes at first.
What hex is, how to read values like 0xFF and 2F, and a complete walkthrough of #FF5733 — plus where else hex shows up in computing.
The three-step pipeline from characters to code points to bytes to bits, with worked examples and why “8 bits per character” is a myth.
Embed our free binary to decimal converter on your own site with one line of code:
<script src="https://binary-to-decimal-28z.pages.dev/embed.js"></script>