How it works
Binary is base-2: every digit (a bit) is either 0 or 1, and each position represents a power of two instead of a power of ten. This calculator takes two binary numbers and either combines them (add, subtract, multiply) or converts one of them straight to decimal — all computed locally as you type.
The formula
Binary → decimal: for a binary string with digits dₙ...d₁d₀, the decimal value is
Σ (dᵢ × 2ⁱ) — each digit multiplied by 2 raised to its position, summed.
Arithmetic: addition and subtraction follow the same column-by-column logic as decimal, except carries happen at base 2 (1+1 = 10, not 2). Multiplication is repeated binary addition (or, equivalently, converting both operands to decimal, multiplying, and converting back).
Worked example
Add 1011 and 0110:
- Rightmost column: 1+0 = 1
- Next: 1+1 = 10 → write 0, carry 1
- Next: 0+1+1(carry) = 10 → write 0, carry 1
- Leftmost: 1+0+1(carry) = 10 → write 0, carry 1
- Result: 10001
Check by converting to decimal: 1011 = 11, 0110 = 6, and 11+6 = 17. Converting 10001 back: (1×16)+(0×8)+(0×4)+(0×2)+(1×1) = 17. It matches.
Tips
- Use the "A → decimal" mode to sanity-check any binary value you're unsure about before doing arithmetic on it.
- Leading zeros don't change the value — 0110 and 110 both equal 6 — but keep them if you're matching a fixed bit-width (like an 8-bit register).
- For negative or fractional binary (two's complement, binary fractions), this tool covers whole-number unsigned binary only — treat results as magnitude, not signed bit patterns.