Binary Addition and Subtraction: How Math Works in 1s and 0s

Binary math looks intimidating at first because it only has two digits to work with, but addition and subtraction in binary follow rules that are actually simpler than their decimal equivalents, once you know the four basic cases.

crossorigin="anonymous">

Binary Addition Rules

Binary addition has only four possible combinations: 0+0=0, 0+1=1, 1+0=1, and 1+1=10 (which is binary for “carry a 1 to the next column, write down 0”). That last case, the carry, is the only part that trips people up, and it works exactly like carrying a 1 in decimal addition when a column adds up to 10 or more.

A Worked Addition Example

Adding 0101 (5) and 0011 (3): starting from the rightmost column, 1+1=10, so write 0 and carry 1. Next column: 0+1+the carried 1=10, so write 0 and carry 1 again. Next column: 1+0+the carried 1=10, write 0, carry 1. Final column: 0+0+the carried 1=1. Reading the result left to right gives 1000, which is 8 in decimal — matching 5+3=8 exactly.

Binary Subtraction Rules

Binary subtraction also has four cases: 0-0=0, 1-0=1, 1-1=0, and 0-1=1 with a borrow from the next column to the left, exactly like borrowing in decimal subtraction when the top digit is smaller than the bottom one.

A Worked Subtraction Example

Subtracting 0011 (3) from 0101 (5): rightmost column, 1-1=0. Next column, 0-1 requires borrowing, so it becomes 10-1=1, and the borrow reduces the next column. Continuing this through all four columns gives 0010, which is 2 in decimal — matching 5-3=2.

Why Computers Use This Instead of Decimal

A computer’s circuits are built from switches that are either on or off, which naturally represent exactly two states — 1 and 0 — so binary arithmetic maps directly onto real hardware in a way decimal arithmetic never could. Every calculation a computer performs, no matter how complex, ultimately breaks down into these same simple binary addition and subtraction steps repeated at enormous speed.

More Addition Examples

  • 0110 + 0111 = 1101 (6 + 7 = 13) (the sum, 13, still fits in four bits)
  • 00101101 + 00011011 = 01001000 (45 + 27 = 72)
  • 01100100 + 01100100 = 11001000 (100 + 100 = 200)

When adding column by column, write the carry above the next column so you do not forget it.

More Subtraction Examples

  • 1010 - 0011 = 0111 (10 - 3 = 7)
  • 01100100 - 00100101 = 00111111 (100 - 37 = 63)
  • 11001000 - 00111000 = 10010000 (200 - 56 = 144)

What Happens When the Answer Is Too Big

A fixed number of bits can only hold a limited range. With 8 bits, the largest value is 255. If you add 200 and 100, the true answer is 300, which needs 9 bits. In a real 8-bit system, the extra digit is lost, a situation called overflow, and the stored result would be 44. Programmers choose the number of bits to avoid this.

Negative Results

When you subtract a larger number from a smaller one, the answer is negative. Computers handle this using two’s complement, where the leftmost bit shows the sign. In 8 bits, 11111111 is not 255 but minus 1. The method is a topic of its own, but the key idea is that subtraction can be done as addition of a negative number, so hardware needs only one kind of circuit.

Always Verify in Decimal

Convert both numbers to decimal, do the math, and convert back. If your binary result does not match, check the carries and borrows column by column. For converting, see binary to decimal explained.

Check Your Work

Working through binary addition and subtraction by hand is the best way to actually understand the carry and borrow rules, but double-checking the result against decimal math is a good habit while you’re learning. Our binary translator can convert your binary answer back to see if it matches, and our guide on how to read binary covers the decimal conversion step in more detail. For the multiplication and division side of binary math, see our guide on binary multiplication and division.

Leave a Comment