---
slug: binary-to-decimal-calculator
title: "Binary to Decimal Converter"
category: developer
updated: 2026-11-17
canonical: https://calcseed.com/c/developer/binary-to-decimal-calculator/
html: /c/developer/binary-to-decimal-calculator/
---

# Binary to Decimal Converter

Convert a binary number (base 2) to its decimal (base 10) equivalent. Free and instant.

## Quick answer

**Quick answer:** with the default inputs (1,011), the decimal value is **11**. Change any input to update the result.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| Binary value | 1011 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Decimal value | 11 |  |

## Formula

```text
value = b_n_×2^n + &hellip; + b_1_×2 + b_0_×1
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| Binary value | number |  | 1011 |

## Outputs

| Result | Format |
| --- | --- |
| Decimal value | primary |
| Decimal value | number |

## How it works

### What you get from the converter

You enter a binary numeral, digits only and nothing else, and the tool returns its decimal value. The defaults are **1011** in and **11** out. That is the whole operation: four bits weigh 8, 2 and 1 in this case, and their sum is the answer.

Binary is base 2, so a numeral is read as a sum of powers of two rather than powers of ten. Nothing about the digits is approximate, which is why a conversion can be checked entirely by hand and must match exactly.

### Place values in a binary numeral

Counting from the right, each position is worth twice the one before it: 1, 2, 4, 8, 16, 32, 64, 128 and onward. A 1 at a position contributes that weight to the total, and a 0 contributes nothing. This is identical to decimal, where positions are worth 1, 10, 100 and so on, except the ratio between neighbours is 2 instead of 10.

| Position | Weight | Bit in 1011 | Contribution |
| --- | --- | --- | --- |
| 3 | 8 | 1 | 8 |
| 2 | 4 | 0 | 0 |
| 1 | 2 | 1 | 2 |
| 0 | 1 | 1 | 1 |

The table also shows why the digit count matters so much. Four bits reach 15, eight bits reach 255, sixteen bits reach 65,535, and thirty-two bits reach 4,294,967,295. Every added bit doubles the ceiling.

### The formula

Each bit *b_i_* is 0 or 1 and each weight is 2^*i*. Because the only possible bit values are 0 and 1, no multiplying of digits is ever needed — you either add the weight or you do not. That is the practical difference from decimal, where a digit of 7 means seven copies of its weight.

The calculator evaluates the same sum in a streaming form: start at 0, and for each digit do **total = total × 2 + digit**. When the digits run out, the total is the decimal value. This is Horner&rsquo;s method and it needs no table of powers.

### Worked example: 1011 becomes 11

Read the digits left to right and apply the doubling rule. Start at 0. Take 1: 0 × 2 + 1 = 1. Take 0: 1 × 2 + 0 = 2. Take 1: 2 × 2 + 1 = 5. Take 1: 5 × 2 + 1 = 11. Four steps, answer 11.

- Position 3 holds a 1, worth 8
- Position 2 holds a 0, worth 0
- Position 1 holds a 1, worth 2
- Position 0 holds a 1, worth 1
- Total: 8 + 0 + 2 + 1 = 11

Both routes give 11, and they must, because the doubling rule is just the place-value sum evaluated in a different order. Checking by division confirms it: 11 ÷ 2 = 5 remainder 1, 5 ÷ 2 = 2 remainder 1, 2 ÷ 2 = 1 remainder 0, 1 ÷ 2 = 0 remainder 1. Reading the remainders upward gives 1011.

#### Powers of two worth memorising

Eight bits cover the weights 1 through 128. If you know those eight numbers you can convert any byte in your head: 11001010 is 128 + 64 + 8 + 2 = 202. Eight-bit values are so common that the table below is worth keeping in reach.

| Power | Value | Power | Value |
| --- | --- | --- | --- |
| 2^0 | 1 | 2^8 | 256 |
| 2^1 | 2 | 2^9 | 512 |
| 2^2 | 4 | 2^10 | 1,024 |
| 2^3 | 8 | 2^11 | 2,048 |
| 2^4 | 16 | 2^12 | 4,096 |
| 2^5 | 32 | 2^13 | 8,192 |
| 2^6 | 64 | 2^14 | 16,384 |
| 2^7 | 128 | 2^15 | 32,768 |

### Where binary input trips people up

#### Failures that produce a plausible number

- A digit other than 0 or 1 is not rejected: 1021 evaluates as 1×8 + 0×4 + 2×2 + 1 = 13, which looks plausible but means nothing
- Leading zeros disappear before conversion, because the field stores a number, so 00000001 arrives as 1 and converts to 1
- A 0b prefix is not accepted; enter the digits alone
- Sixteen bits is the practical ceiling here, at 65,535, so a 32-bit pattern will be misread as a shorter numeral
- Binary text pasted from a document may contain spaces or line breaks, which break the digit sequence

The digit problem is the dangerous one because it fails silently. A string such as 1012 is not a binary number at all, yet the arithmetic proceeds and returns something. Before you trust a result, confirm that every character is a 0 or a 1.

Leading zeros are harmless for the value but they carry information in practice. A pattern of 00000101 and one of 101 are the same number, but only the first tells you the field is eight bits wide. If width matters, record it separately.

### Range and precision

The input is rounded to a whole number, so 1011.4 becomes 1011, and the largest usable entry is sixteen digits long. Because the value is stored as an ordinary JavaScript number rather than a bit pattern, there is no wrap-around and no sign bit: you get the exact sum of the powers of two, up to 2^16 − 1 = 65,535 for a full sixteen-bit string.

That matters when you move between tools. Languages that hold eight-bit unsigned bytes wrap 255 + 1 back to 0, and signed bytes turn 128 into −128. This converter does neither; it reports the non-negative integer the digits describe. Use it to read a value, not to model overflow.

## FAQ

### How do I convert 1011 to decimal?

Add the weights where the bit is 1: 8 + 2 + 1 = 11. The four bits are worth 8, 4, 2 and 1, and only the 8, 2 and 1 positions are set.

### What is 11111111 in decimal?

255. Eight ones sum to 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128, which is one less than 2^8 = 256.

### How many decimal values can 8 bits hold?

256 values, from 0 to 255. If one bit is reserved for a sign, the range becomes −128 to 127 instead, still 256 distinct patterns.

### Why does the input drop my leading zeros?

The field stores a number, and 00000001 and 1 are the same number, so the zeros are stripped before conversion. The decimal result is unaffected, but the original width is not preserved.

### What happens if I type 1021?

The converter does not validate digits, so it computes 1×8 + 0×4 + 2×2 + 1 = 13. Always confirm that the input contains only 0s and 1s.

### What is the decimal value of 10000000?

128. A single 1 in the eighth position from the right is worth 2^7. In a signed byte that same pattern means −128, which is why context matters.

### Is there a shortcut for long binary numbers?

Convert to hex first. Group the bits in fours, translate each nibble to one hex digit, then expand: 1111 1111 is FF, which is 15×16 + 15 = 255.

### What is 1010 1010 in decimal?

170. The set bits are 128, 32, 8 and 2, and their sum is 170. It is the alternating pattern often used to test bit-level code.

### Can I convert a negative binary number?

Not here. The tool reads the digits as a plain magnitude, so 11111111 is 255 rather than −1. Two&rsquo;s complement interpretation needs a fixed width and a sign convention this converter does not assume.

## Method and sources

Methodology: Conversions and formats follow the relevant IETF RFCs and IEEE standards, including RFC 4648 for Base64 and RFC 791 for IPv4 addressing.

Last updated: 2026-11-17.
- Positional numeral system, base 2.
