Binary Arithmetic Step by Step: Adding, Subtracting and Two's Complement
Learn binary addition with carries, subtraction with borrows, multiplication and division, and how two's complement represents negative numbers.

Binary Arithmetic Step by Step: Adding, Subtracting and Two's Complement
Computers do all their arithmetic in binary, and computer science and electronics courses expect students to do it by hand. The rules are short, but carries and borrows ripple across columns, and negative numbers bring in two's complement. This guide explains each operation with the free binary calculator with steps.
Binary addition
Four facts cover everything:
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 1 = 10 (write 0, carry 1)
- 1 + 1 + 1 = 11 (write 1, carry 1)
Example: 1011 + 110, which is 11 + 6. From the right: 1 + 0 = 1. Then 1 + 1 = 10: write 0, carry 1. Then 0 + 1 + 1 = 10: write 0, carry 1. Then 1 + 0 + 1 = 10: write 0, carry 1. The final carry becomes a new leftmost digit: 10001, which is 17.
The calculator shows the carry row above the numbers and explains every column.
Binary subtraction
The facts are 0 − 0 = 0, 1 − 0 = 1, 1 − 1 = 0, and for 0 − 1 you must borrow. Borrowing 1 from the next column gives 2 in the current column, so 10₂ − 1 = 1. If the next column is 0, the borrow passes through it, turning each 0 into 1, until it reaches a 1.
Example: 1000 − 1. The rightmost 0 needs a borrow, which passes through two zeros to the leftmost 1. The result is 111, which is 8 − 1 = 7. The calculator marks every borrowed column.
Multiplication and division
Multiplying by a binary digit is easy: by 1 copy the number, by 0 write zeros. So 101 × 11 is 101 plus 1010 (101 shifted one place), which is 1111, or 5 × 3 = 15. The calculator writes one row for each bit and adds them.
Binary long division brings down one bit at a time. If the divisor fits into the bits so far, write 1 and subtract; otherwise write 0. 11011 ÷ 101 gives quotient 101 and remainder 10, which is 27 ÷ 5 = 5 remainder 2.
Checking in decimal
Every result is shown in decimal and hexadecimal too. Converting back is the quickest way to check: 10001 is 16 + 1 = 17, and 11 + 6 = 17.
Two's complement for negative numbers
Computers store signed integers in two's complement. In n bits, the leftmost bit counts as −2^(n−1) instead of +2^(n−1). With 8 bits that gives a range from −128 to 127.
To write a negative number:
- Write its size in binary with all n bits: 5 is 00000101.
- Invert every bit: 11111010.
- Add 1: 11111011. That is −5.
The wonderful property is that addition works without special rules. −5 + 3 is 11111011 + 00000011 = 11111110, which reads back as −2. Any carry out of the leftmost bit is simply dropped.
The calculator's Two's complement tab does these conversions for 4, 8, 16 or 32 bits, adds two signed numbers this way and reads the result back.
Overflow
If the true result does not fit in n bits, the answer wraps around. 100 + 100 in 8 bits gives 11001000, which reads as −56. Overflow can only happen when adding two numbers of the same sign and getting a result of the opposite sign. The calculator flags it.
Practice
The Practice tab generates addition, subtraction, multiplication, two's complement and binary-to-decimal questions, each with worked steps.
Limits
Study tips
Learn the powers of two up to 2^10 = 1024 by heart; they make converting between binary and decimal fast. Write numbers in groups of four bits, which also map neatly to hexadecimal digits. When subtracting, check by adding the answer back to the smaller number. And in two's complement questions, always state the number of bits, because 11111011 is −5 in 8 bits but 251 as an unsigned number.
Limits
The calculator covers whole numbers. Fractions, floating point and bitwise logic are separate topics.


