How-toMath & conversion4 min read

Binary Addition, Subtraction, Multiplication and Division: Worked Examples

Rules and worked examples for the four binary operations, checked in decimal.

SH

Founder, CalculatePilot

On this pageexpand_more
Binary arithmetic worked examples
lightbulb

Short answer

Binary addition uses 0+0=0, 0+1=1, 1+1=10 (carry 1) and 1+1+1=11. For example 1011 + 0110 = 10001 (11 + 6 = 17). Subtraction borrows from the next column, multiplication adds shifted copies, and division is repeated subtraction.

1. Addition

BitsSumCarry
0 + 000
0 + 110
1 + 101
1 + 1 + 111

Example: 1011 + 0110. Right to left: 1+0=1; 1+1=0 carry 1; 0+1+1=0 carry 1; 1+0+1=0 carry 1; the last carry gives 10001. In decimal, 11 + 6 = 17.

2. Subtraction

Example: 1010 − 0011. The right column needs a borrow, and working through the columns gives 0111. In decimal, 10 − 3 = 7.

If the answer is negative, an unsigned register wraps: 0011 − 0101 at 8 bits gives 11111110, which is 254 unsigned or −2 in two's complement.

3. Multiplication

Multiply like long multiplication, but each partial product is either 0 or a shifted copy of the top number. Example: 1011 × 1101 = 1011 + 101100 (shifted by 2) + 1011000 (shifted by 3) = 10001111. In decimal, 11 × 13 = 143.

4. Division

Example: 1101 ÷ 0100. 13 ÷ 4 = 3 remainder 1, so the quotient is 11 and the remainder is 1.

5. Check with decimal

BinaryDecimalResult
1011 + 011011 + 610001 = 17
1010 − 001110 − 30111 = 7
1011 × 110111 × 1310001111 = 143
1101 ÷ 010013 ÷ 411 remainder 1

Check any sum with the Binary Calculator, which shows the step-by-step working. Background: how to use a binary calculator.

6. Frequently asked questions

How do you add binary numbers?expand_more

Add column by column from the right, carrying 1 whenever a column adds to 2 or more.

What is 1 + 1 in binary?expand_more

10 (zero, carry one).

How do you subtract binary numbers?expand_more

Subtract column by column, borrowing from the next column when you need to take 1 from 0.

What is 1011 × 1101?expand_more

10001111, which is 11 × 13 = 143.

7. Sources

Spotted a mistake or a number that looks off?

We fix errors quickly and note the change.