Binary arithmetic – addition, subtraction, multiplication and division
Intermediate · 9 min read · Updated 28 November 2026
In shortBinary arithmetic follows the same column methods as decimal, but you carry or borrow at 2 instead of 10. The key facts are 1 + 1 = 10 (write 0, carry 1), 1 + 1 + 1 = 11, and 0 − 1 = 1 with a borrow of 1 from the next column. Multiplication is shift-and-add, and division is long division using only 0 and 1.
Binary addition rules
| A | B | Carry in | Sum | Carry out |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Example: 1011 + 0110
carry 1 1 1
1 0 1 1 (11)
+ 0 1 1 0 ( 6)
---------
1 0 0 0 1 (17)
Right to left: 1+0 = 1; 1+1 = 0 carry 1; 0+1+1 = 0 carry 1; 1+0+1 = 0 carry 1; the final carry becomes the leading 1.
Binary subtraction with borrowing
| A − B | Result | Borrow |
|---|---|---|
| 0 − 0 | 0 | 0 |
| 1 − 0 | 1 | 0 |
| 1 − 1 | 0 | 0 |
| 0 − 1 | 1 | 1 |
When you borrow, the column you borrow into gains 2 (written 10), exactly like borrowing 10 in decimal.
Example: 1100 − 0101
1 1 0 0 (12)
− 0 1 0 1 ( 5)
---------
0 1 1 1 ( 7)
The rightmost column is 0 − 1, so borrow: the 0 becomes 10₂ (2), and 2 − 1 = 1. Keep borrowing leftwards through the zeros until you reach a 1.
Binary multiplication
Multiply by each bit of the second number, shifting one place left each time, then add — just like long multiplication, but every partial product is either 0 or a copy of the first number.
1 0 1 (5)
× 1 1 (3)
-------
1 0 1
1 0 1 0 (shifted)
-------
1 1 1 1 (15)
Shortcut: multiplying by 2 shifts every bit left one place (101 → 1010); dividing by 2 shifts right. That is why programmers write x << 1 instead of x * 2.
Binary division
Use long division. At each step the quotient digit is either 1 (the divisor fits) or 0 (it doesn’t).
1101 ÷ 100 (13 ÷ 4): 100 fits into 110 once, remainder 10; bring down 1 → 101, fits once, remainder 1. Quotient 11 (3), remainder 1.
Check any answer with the binary calculator.
What happens when the answer doesn’t fit? (Overflow)
In a fixed 8-bit register, 11111111 + 00000001 gives 1 00000000 — nine bits. The ninth bit is lost, leaving 00000000. This overflow is a classic source of bugs, from old video-game glitches to the 2038 problem for 32-bit Unix clocks.
Frequently asked questions
What is 1 + 1 in binary?
10. One plus one is two, and two is written 10 in binary — you write 0 and carry 1.
What is 1 + 1 + 1 in binary?
11 (three). Write 1 and carry 1.
How do computers subtract?
Most processors don’t have a separate subtractor. They add the two’s complement of the second number, which gives the same result with the same adder circuit.
Next: Negative numbers in binary (two’s complement) →