Binary Calculator

Add, subtract, multiply and divide directly in binary — with every column of the working shown: carries, borrows, partial products, long division. Decimal values included.

Result (binary)
Waiting for input — calculation happens instantly in your browser.

How Binary Addition Works

Same columns as decimal, but a column rolls over at 2 instead of 10. Four rules cover everything: 0+0=0, 1+0=1, 1+1=10, 1+1+carry=11.

Work right to left. For 1011 + 110 (11 + 6): column 1 is 1+0=1; column 2 is 1+1=10 — write 0, carry 1; column 3 is 0+1 plus the carry, so 1+1=10 again — write 0, carry 1; column 4 is 1+0 plus the carry = 10 — write 0, and the final carry spills into a new column. Result: 10001 = 17. The calculator above lists exactly these columns for your own inputs under “Step-by-step working”; if the place values themselves are unfamiliar, how to read binary covers them first.

Subtraction: The Borrow Chain

Only one column shape ever needs a borrow: 0 − 1. The 0 borrows from the next 1 to its left and becomes 2, so the column reads 2 − 1 = 1 — and every 0 crossed on the way becomes 1, just like decimal borrowing across zeros. For 1010 − 111 (10 − 7): column 1 is 0 − 1, so it borrows and becomes 2 − 1 = 1; the 1 it borrowed from is now 0, so column 2 is again 0 − 1 and borrows in turn; the chain ends one column later and the result is 11 = 3. The calculator lists each borrow as it happens.

Multiplication Is Shift-and-Add; Division Is Long Division

Binary multiplication has no times table: each 1-bit of the second number contributes the first number shifted left by that position, and 0-bits contribute nothing. 110 × 101 (6 × 5) is 110 + 11000 = 11110 = 30. Division is long division with a built-in shortcut: at each step the working value either reaches the divisor (quotient bit 1, subtract) or it does not (quotient bit 0) — no guessing digits. 10110 ÷ 101 (22 ÷ 5) walks to quotient 100 = 4 with remainder 10 = 2. The workings above show every step; how binary numbers work has more addition and counting demos, and the binary to decimal converter converts either side if you want to double-check a column.

Signed Arithmetic — and Its Honest Limits

Enable Signed (two’s complement) to treat inputs as signed values whose width is set by your longest input: in 4-bit signed, 0111 is 7 and 0111 + 0001 wraps to 1000, which reads as −8. That is not a bug — it is exactly what a 4-bit register does, and the calculator says “overflows” out loud when the true result leaves the range.

Two honest limits. First, the column workings are shown for the unsigned bit patterns — two's-complement addition happens to use identical columns, but signed subtraction, multiplication and division follow sign rules the vertical form does not capture, so the signed interpretation line under the steps is the authoritative part there. Second, workings are hidden for inputs longer than 64 bits (the result itself stays exact at any length — this calculator computes with arbitrary precision, not 32-bit integers).

Common Mistakes

  • Mistake: forgetting the incoming carry on 1+1. 1+1 alone is 10 (write 0, carry 1), but with a carry arriving it is 11 — write 1, carry 1. Correction: every column adds three bits, not two; the workings list the carry explicitly so you can see it.
  • Mistake: stopping a borrow after one column. In 1000 − 1, the borrow crosses three zeros: each becomes 1 and the 1 becomes 0, giving 0111. Correction: a borrow travels left until it finds a 1 — it never stops at a 0.
  • Mistake: forgetting placeholder zeros when multiplying. The partial product for shift 2 ends in two zeros — 110 becomes 11000, not 110 written higher up. Correction: count the shift positions; each 1-bit of the multiplier shifts by its own index.

Practice

1. Compute 110 + 101. Column by column: 0+1=1; 1+0=1; 1+1=10 — answer: 1011 (6 + 5 = 11).

2. Compute 101 × 11. Partial products 101 and 1010 — answer: 1111 (5 × 3 = 15).

3. Compute 10101 ÷ 11. Long division gives quotient 111 (7) with remainder 0 — 21 ÷ 3 exactly. Verify all three in the calculator above.

Binary Calculator FAQ

How do you add binary numbers?

Column by column from the right, exactly like decimal — but carrying happens at 2 instead of 10: 0+0=0, 1+0=1, 1+1=10 (write 0, carry 1), and 1+1 plus an incoming carry is 11 (write 1, carry 1). The calculator above lists every column with its carry.

What is 1 + 1 in binary?

10 — the binary way to write two. There is no digit 2, so the column rolls over: write 0 and carry 1 into the next column, just like 9+1 rolls to 10 in decimal.

How does borrowing work in binary subtraction?

Only one situation needs a borrow: 0 − 1. The 0 borrows from the next 1 to its left and becomes 2, so the column reads 2 − 1 = 1 — and every 0 crossed along the way becomes 1, exactly like borrowing across zeros in decimal.

How do you multiply binary numbers?

Shift and add. For each 1-bit in the second number, write the first number shifted left by that bit's position; 0-bits contribute nothing. Then add the partial products — 110 × 101 is 110 + 11000 = 11110.

How do you divide binary numbers?

By long division, walking the dividend left to right: grow a working value one bit at a time, write quotient bit 1 whenever it reaches the divisor and subtract, otherwise write 0. The result is a quotient plus a remainder — 10110 ÷ 101 = 100 remainder 10.

Can this calculator handle negative numbers?

Yes — enable Signed (two’s complement) mode. The bit width is set by your longest input, and results wrap at that width: 0111 + 0001 = 1000, which reads as −8 in 4-bit signed. The honest catch: the same overflow rules as real hardware apply.