Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Decimal Value
45
base 10
Number of bits 6

What Is a Binary to Decimal Converter?

A binary to decimal converter changes a number written in base 2 (using only the digits 0 and 1) into its equivalent in base 10, the everyday number system. Computers store and process everything in binary, so converting to decimal is essential whenever you need a human-readable value from raw bits, memory dumps, network masks, or programming output.

How to Use It

Type your binary number into the field — for example 101101 — and the calculator returns the decimal value along with the number of bits. Any character that is not a 0 or 1 is ignored, so you can safely paste spaced groups like 1011 0101.

The Formula Explained

Each binary digit (bit) carries a positional weight equal to 2 raised to the power of its position, counting from the right starting at 0. The decimal value is the sum of every bit multiplied by its weight:

$$D = \sum b_i \cdot 2^i$$

The rightmost bit has weight \(2^0 = 1\), the next \(2^1 = 2\), then \(2^2 = 4\), \(2^3 = 8\), and so on.

Binary digits aligned under their positional powers of two
Each bit is multiplied by a power of two based on its position.

Worked Example

Convert 101101. Reading from the right with weights 1, 2, 4, 8, 16, 32:

$$(1 \cdot 32) + (0 \cdot 16) + (1 \cdot 8) + (1 \cdot 4) + (0 \cdot 2) + (1 \cdot 1) = 32 + 8 + 4 + 1 = \mathbf{45}.$$ So binary 101101 equals decimal 45.

Step-by-step conversion of binary 1011 into decimal by summing weighted bits
Summing the weighted bits of 1011 gives the decimal value 11.

Powers of Two Positional Weights

In a binary number, each bit has a positional weight equal to a power of two. The rightmost bit (position 0) carries the weight \(2^0 = 1\), and each position to the left doubles the weight. To convert by hand, multiply each bit by its weight and add the results:

$$\text{Decimal} = \sum_{i=0}^{n-1} d_i \cdot 2^{\,i}$$

where \(i\) counts positions from the right (least-significant bit), starting at 0.

Bit position \(i\) Power \(2^i\) Decimal weight
0 \(2^0\) 1
1 \(2^1\) 2
2 \(2^2\) 4
3 \(2^3\) 8
4 \(2^4\) 16
5 \(2^5\) 32
6 \(2^6\) 64
7 \(2^7\) 128
8 \(2^8\) 256
9 \(2^9\) 512
10 \(2^{10}\) 1,024
11 \(2^{11}\) 2,048
12 \(2^{12}\) 4,096
13 \(2^{13}\) 8,192
14 \(2^{14}\) 16,384
15 \(2^{15}\) 32,768
16 \(2^{16}\) 65,536

For an 8-bit byte the maximum value is \(2^8 - 1 = 255\) (all eight bits set to 1), and for 16 bits it is \(2^{16} - 1 = 65{,}535\).

More Worked Examples

Each example lines up every bit with its positional weight from the table above, keeps only the weights where the bit is 1, and adds them to get the decimal value.

Example 1: 11111111 (8 bits all set)

Every bit is 1, so we add all eight weights from position 7 down to position 0:

$$128 + 64 + 32 + 16 + 8 + 4 + 2 + 1$$

The total is 255, which is the largest value an 8-bit byte can hold.

Example 2: 10000000

Only the leftmost bit (position 7) is 1; all other positions contribute 0:

$$1\cdot128 + 0\cdot64 + 0\cdot32 + 0\cdot16 + 0\cdot8 + 0\cdot4 + 0\cdot2 + 0\cdot1$$

This simplifies to just the single weight \(2^7\), giving 128.

Example 3: 110010101 (9 bits)

Writing the bits with their position weights, the 1-bits sit at positions 8, 7, 4, 2 and 0:

Bit 1 1 0 0 1 0 1 0 1
Position 8 7 6 5 4 3 2 1 0
Weight 256 128 64 32 16 8 4 2 1

Adding only the weights where the bit is 1:

$$256 + 128 + 16 + 4 + 1$$

The decimal result is 405. You can confirm the reverse direction with a decimal-to-binary converter by entering 405 and checking that it returns 110010101.

FAQ

What is the largest 8-bit binary number? It is 11111111, which equals 255 in decimal (\(2^8 - 1\)).

Can I enter leading zeros? Yes. Leading zeros do not change the value — 0010 is the same as 10, both equal to decimal 2.

Does this handle fractional binary? No, this tool converts whole binary integers only. Fractional parts after a point are not supported.

Last updated: