Binary Calculator

Enter a binary string to convert it to decimal, hex, and octal — or select arithmetic mode to add, subtract, multiply, or divide two binary numbers and get the result in binary and decimal.

How to use this calculator

  1. For conversion: enter a binary string of 0s and 1s to get decimal, hexadecimal, and octal equivalents.
  2. For arithmetic: enter two binary numbers and select the operation.
  3. The result is shown in binary, decimal, and hexadecimal simultaneously.

Formula & method

Binary to decimal positional notation

Decimal = Σ bit_i × 2^i (from right, i = 0) · Binary add: treat as base-2, carry when sum ≥ 2

Right-to-left positional values: 1, 2, 4, 8, 16, 32, 64, 128, …

Example

10110₂ = 0×1 + 1×2 + 1×4 + 0×8 + 1×16 = 22₁₀ = 0x16 = 0o26.

Key insights

How to interpret your result

Binary to decimal

Each bit position represents a power of 2, from right to left: 2⁰=1, 2¹=2, 2²=4, 2³=8, etc.

Bit length

The number of digits in the binary representation. An n-bit number can represent values from 0 to 2ⁿ − 1.

Frequently asked questions

What is a binary number?
A base-2 number using only digits 0 and 1. Each position represents a power of 2.
How do I convert binary to decimal?
Multiply each bit by 2 raised to its position (0 from the right) and sum them. 1011₂ = 8+0+2+1 = 11₁₀.
How does binary addition work?
Like decimal but carry when the sum ≥ 2: 0+0=0, 0+1=1, 1+1=10 (carry), 1+1+1=11 (carry).

Related calculators

See all math calculators · Explore all online calculators