Ekuation

conversion

Binary to Decimal Converter

Convert binary numbers to decimal instantly. See the positional breakdown showing each bit\'s power-of-2 contribution.

Back to Number Base Converter

Enter a binary number (digits 0 and 1). Accepts 0b prefix.

Maximum fractional digits for non-terminating expansions.

Number Base Conversion Tips

Click to show tips

Try an Example

Pick a scenario to see how the calculator works, then adjust the values

ASCII Letter A

Convert the ASCII code for uppercase A (65) across all bases.

Key values: Decimal 65 · Binary 1000001 · Hex 41

Byte Maximum

The largest value a single byte can hold (255).

Key values: Decimal 255 · Binary 11111111 · Hex FF

Hex Color Code

Convert a common hex color code (deep sky blue) to other bases.

Key values: Hex 00BFFF · Decimal 49151 · Binary nibbles

Documentation

The Binary Number System

Binary (base-2) uses only two digits: 0 and 1. Each position represents a power of 2, just as each position in decimal represents a power of 10:

123  022  121  120=8+0+2+1=11\underbrace{1}_{2^3}\;\underbrace{0}_{2^2}\;\underbrace{1}_{2^1}\;\underbrace{1}_{2^0} = 8 + 0 + 2 + 1 = 11

Conversion Method

Multiply each binary digit by its positional power of 2, then sum:

(bnbn1b1b0)2=i=0nbi×2i(b_n b_{n-1} \ldots b_1 b_0)_2 = \sum_{i=0}^{n} b_i \times 2^i

Worked Example

Convert 11010110211010110_2 to decimal:

1 ⁣× ⁣128+1 ⁣× ⁣64+0 ⁣× ⁣32+1 ⁣× ⁣16+0 ⁣× ⁣8+1 ⁣× ⁣4+1 ⁣× ⁣2+0 ⁣× ⁣1=2141 \!\times\! 128 + 1 \!\times\! 64 + 0 \!\times\! 32 + 1 \!\times\! 16 + 0 \!\times\! 8 + 1 \!\times\! 4 + 1 \!\times\! 2 + 0 \!\times\! 1 = 214

Powers of 2 Reference

Position202^0212^1222^2232^3242^4252^5262^6272^7
Value1248163264128

An 8-bit byte can represent 28=2562^8 = 256 values (0 to 255). A 16-bit value reaches 65,535. A 32-bit value reaches approximately 4.3 billion.


Why Computers Use Binary

Electronic circuits have two stable states: on (high voltage) and off (low voltage). Binary maps directly to these states, making it naturally resistant to electrical noise. A circuit doesn't need to distinguish between 10 voltage levels (as base-10 would require) — just two. This simplicity enables reliable computation at billions of operations per second.


Common Binary Patterns

BinaryDecimalSignificance
11111111255Maximum 8-bit unsigned value; max RGB channel
10000000128Highest bit set (sign bit in signed integers)
01111111127Maximum signed 8-bit value
000000011Least significant bit (LSB)

Frequently Asked Questions

How do you convert binary to decimal?

Multiply each binary digit by its positional power of 2 and sum the results. For example, 1011 in binary = 1×23+0×22+1×21+1×20=8+0+2+1=111 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 = 8 + 0 + 2 + 1 = 11 in decimal.

Why do computers use binary instead of decimal?

Electronic circuits have two stable states: on (high voltage) and off (low voltage). Binary maps directly to these states, making it naturally resistant to electrical noise. A circuit only needs to distinguish between two voltage levels, not ten.

What is the largest number an 8-bit byte can represent?

An unsigned 8-bit byte can represent values from 0 to 255. With all bits set to 1 (11111111), the value is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.

What are common binary patterns I should memorize?

11111111 = 255 (max byte), 10000000 = 128 (sign bit), 01111111 = 127 (max signed byte), 00000001 = 1 (LSB). Knowing these makes working with binary data much faster.

How many binary digits are needed for a given decimal number?

A decimal number N requires approximately log2(N+1)\lceil \log_2(N + 1) \rceil binary digits. For example, 255 needs 8 bits, 256 needs 9 bits, and 1024 needs 11 bits.

Related conversion Variants

Explore more conversion options

More Math Calculators

Explore the category

Calculator Search

Search and find calculators