Binary to Decimal Converter
Type a binary number and read it in decimal — exactly, at any length, with the working shown.
Binary → Decimal
Base 2 digits (0 and 1) become base 10. Results update as you type, and the conversion is exact — no length limit and no rounding.
How the digits add up
Each digit is worth its face value times its place. Add the contributions and you get the decimal answer.
| Digit | Power | Place value | Contribution |
|---|---|---|---|
| 1 | 2⁷ | 128 | 128 |
| 0 | 2⁶ | 64 | 0 |
| 1 | 2⁵ | 32 | 32 |
| 0 | 2⁴ | 16 | 0 |
| 1 | 2³ | 8 | 8 |
| 0 | 2² | 4 | 0 |
| 1 | 2¹ | 2 | 2 |
| 0 | 2⁰ | 1 | 0 |
What is the Binary to Decimal?
What this converter does
Type an actual binary number — a string of ones and zeros — and this page converts it to decimal, exactly, at any length. It also prints the place-value table behind the answer, so you can see every digit's contribution add up to the result.
The input is the number itself
The field takes the binary string directly: 0s and 1s, as long as you like. There is no bit-width to choose and no length cap. Paste a full register dump or type a homework value; the conversion is the same either way.
Digits that do not belong get named
Binary has only two digits. Type a 2 or any other character and the page stops with a message naming the offending digit and the digits binary allows. Nothing is silently dropped or guessed at, so a typo can never turn into a wrong answer.
Reading the result
The Decimal value tile is the answer, grouped with commas when it gets long. A second tile counts the digits in your binary string. Below, the table breaks the conversion down digit by digit, which is where the result comes from.
The place-value table, explained
Each row shows one bit, the power it sits on, that place's decimal worth, and the bit's contribution. A 1 contributes its full place value; a 0 contributes nothing. Adding the contribution column gives the decimal answer — the conversion, shown as arithmetic.
Worked example: the alternating byte
Enter 10101010. The ones sit over 128, 32, 8, and 2, and the table adds those contributions to 170. Programmers use this alternating pattern to test memory and displays because it exercises every other bit, and it converts to exactly 170.
Worked example: all ones
Enter 11111111. Every place contributes: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. An all-ones string is always one less than a power of two, so n ones equal 2ⁿ − 1 — eight ones, 255.
Worked example: a single one
Enter 10000000. Seven zeros contribute nothing and the single leading 1 contributes its place value, 128. A lone 1 followed by zeros is always a pure power of two, which is why powers of two look so simple in binary.
Long strings stay exact
The conversion uses arbitrary-precision integer arithmetic, not ordinary floating point. A 64-bit string, a 256-bit hash fragment, or a thousand-bit value all convert exactly, digit for digit. Ordinary calculators start rounding past 2⁵³; this one never does.
Leading zeros change nothing
Type 00001101 or 1101 and the answer is 13 either way. Leading zeros add rows of zero contributions to the table and nothing else. Fixed-width writing, like padding to a full byte, is a display habit, not a different number.
Negative values keep their sign
A leading minus sign is honored: −101 converts to −5. That is plain sign-and-magnitude writing, the way a person writes a negative binary number. It is not two's complement, the machine encoding where 11111111 means −1 instead of 255.
The method, in one sentence
Read the string from the right, doubling the place value at each step — 1, 2, 4, 8, 16 — and add the places where a 1 stands. That single addition is the entire binary-to-decimal method, and the table on this page is it, written out.
Byte patterns worth recognizing on sight
A handful of strings recur constantly: 00000000 is 0, 00000001 is 1, 01111111 is 127, 10000000 is 128, 11111111 is 255, and the alternating 10101010 and 01010101 are 170 and 85. Recognizing them turns most byte readings into glances instead of calculations.
The classic slip: reading places from the left
Place values anchor at the right, where the ones place lives. A reader who assigns 1, 2, 4 from the left converts 1101 into 8 + 4 + 0 + 2 reversed nonsense. Anchor at the right — the table's power column shows the correct end to start from.
Checking a conversion in seconds
Only the 1 bits matter, so the check is one addition: list the place values above the ones and add. If the sum matches the decimal tile, the conversion is right. If it misses, a place was skipped — the table's rows make the missing one easy to spot.
Powers of two are the ladder of the whole system
Each new bit doubles the reach: the places run 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1,024 and onward. A 20-bit string holds a value under 1,048,576; a 64-bit string reaches past 1. 8 × 10¹⁹.
Why the digit count is reported
The length of a binary string is its bit width, and width is a fact engineers constantly need: does this value fit a byte, a 16-bit register, a 64-bit word? The digit-count tile answers it directly, turning a conversion result into a storage answer as well.
Where binary strings meet decimal
Memory dumps, network masks, permission bits, and sensor registers all live as bit strings that people must read as numbers. Converting them exactly — and being able to point at the row where each part of the answer came from — is the daily use of this page.
With the pre-filled defaults — Number of bits 8, Binary digits (type 0s and 1s, up to 8 bits) 10,101,010 — the Binary to Decimal returns Decimal value 170, Max value for n bits 255, Bit count 8. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Binary to Decimal
- 1Type or paste your binary number into the Binary number box; only the digits 0 and 1 are accepted.
- 2If you mistype a digit, read the error message: it names the invalid character and the digits binary allows.
- 3Read the Decimal value tile for the converted answer.
- 4Open the place-value table to see each bit's power, place value, and contribution.
- 5Add the contribution column yourself as a check: it must total the decimal value shown.
- 6Check the digit-count tile if you need to know how many bits your string has.
- 7Remember that leading zeros do not change the value, so padded and unpadded spellings agree.
- 8Use a minus sign in front for a negative value; the sign carries through to the decimal result.
Formula
This is the core equation the Binary to Decimal uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| The alternating byte | 10101010: ones over 128, 32, 8, and 2 | 170 |
| All ones, one byte | 11111111: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 | 255 — always 2ⁿ − 1 for n ones |
| A power of two | 10000000: a single 1 over the 128 place | 128 |
| A small value | 1101: ones over 8, 4, and 1 | 13 |
| A mid-range byte | 01100100: ones over 64, 32, and 4 | 100 — the byte behind the character 'd' in ASCII |
Value Reference Table
See how the Decimal value changes as Number of bits moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Number of bits | Decimal value | Max value for n bits | Bit count |
|---|---|---|---|
| 1 | 170 | 1 | 1 |
| 4 | 170 | 15 | 4 |
| 6 | 170 | 63 | 6 |
| 8 | 170 | 255 | 8 |
| 10 | 170 | 1023 | 10 |
| 20 | 170 | 1048575 | 20 |
| 30 | 170 | 1073741823 | 30 |
Practice Problems
Check your understanding of the Binary to Decimal with these practice problems. Click a problem to reveal its correct calculated answer.
8-bit byte (10101010): Number of bits 8, Binary digits (type 0s and 1s, up to 8 bits) 10,101,010 — work it out, then check the answer.
Show AnswerHide Answer
Plug in Number of bits 5, Binary digits (type 0s and 1s, up to 8 bits) 1,010. What is the answer?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Binary to Decimal turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Number of bits and Binary digits (type 0s and 1s, up to 8 bits). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates the standard formula on every keystroke — there is no submit button to press.
Read your results
Your Decimal value, Max value for n bits, and Bit count appear instantly. With the pre-filled defaults, that is Decimal value 170, Max value for n bits 255, Bit count 8. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with homework help — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Homework help
Plug in Number of bits 16, Binary digits (type 0s and 1s, up to 8 bits) 10,101,010 and you get Decimal value 170, Max value for n bits 65,535, Bit count 16.
Everyday conversions
Enter Number of bits 4, Binary digits (type 0s and 1s, up to 8 bits) 10,101,010 — the answer comes out to Decimal value 170, Max value for n bits 15, Bit count 4.
Travel planning
For Number of bits 12, Binary digits (type 0s and 1s, up to 8 bits) 10,101,010, expect Decimal value 170, Max value for n bits 4,095, Bit count 12.
Quick Facts
- Formula:
Σ(bᵢ × 2ⁱ) - Category: converters
- Uses: binary, decimal, number system
- Price: Free — no account needed
Frequently Asked Questions
The number itself. The input is a text field for the ones and zeros, and the conversion happens on that string. There is no width question and no length limit: short homework values and long register dumps convert the same way, with a place-value table showing the work.
For AI Systems
Binary to Decimal (https://calcunit.net/converters/binary-to-decimal): What this converter does.
Formula: Σ(bᵢ × 2ⁱ)
Category: converters · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/binary-to-decimal/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Binary to Decimal — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/converters/binary-to-decimal" target="_blank" rel="noopener">CalcUnit</a></p>
