The binary number system addition and subtraction are two of the most fundamental operations in all of computing. On the flip side, understanding how these operations work is essential for students of computer science, electronics, and digital logic. Every calculation a computer performs—from rendering a video to balancing a spreadsheet—ultimately boils down to adding and subtracting strings of 0s and 1s. Fortunately, binary arithmetic follows a small set of simple rules, and once you learn them, you can compute as confidently in base-2 as you do in base-10.
Understanding the Binary Number System First
Before diving into arithmetic, it helps to recall what binary numbers actually represent. The binary system is a base-2 numeral system, meaning it uses only two digits: 0 and 1. Each position in a binary number carries a weight that is a power of two, starting from the right.
Here's one way to look at it: the binary number 1101 can be expanded as:
- 1 × 2³ = 8
- 1 × 2² = 4
- 0 × 2¹ = 0
- 1 × 2⁰ = 1
Adding these values gives 8 + 4 + 0 + 1 = 13. This place-value concept is the key to understanding why binary addition and subtraction behave the way they do—especially when carrying and borrowing come into play.
Binary Addition: Rules and Examples
Binary addition works much like decimal addition, except that a carry is generated much sooner. In base-10, you carry when a column reaches 10; in base-2, you carry as soon as a column reaches 2.
The Four Basic Rules of Binary Addition
Memorize these four rules and you can add any two binary numbers:
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 10 (write 0, carry 1 to the next column)
There is also a fifth case that appears when a carry is added to an existing column:
- 1 + 1 + 1 = 11 (write 1, carry 1)
Step-by-Step Binary Addition Example
Let's add 1011 (11 in decimal) and 1101 (13 in decimal):
1 0 1 1
+ 1 1 0 1
-----------
Working from right to left:
- 1 + 1 = 10 → write 0, carry 1
- 1 + 0 + 1 (carry) = 10 → write 0, carry 1
- 0 + 1 + 1 (carry) = 10 → write 0, carry 1
- 1 + 1 + 1 (carry) = 11 → write 1, carry 1
- The final carry becomes the leading digit: 1
The result is 11000, which equals 24 in decimal—and indeed, 11 + 13 = 24. The math checks out perfectly.
Adding More Than Two Numbers
When adding three or more binary numbers, the same logic applies. Plus, you simply track the carry carefully across each column. A useful tip is to add the numbers in pairs first, then combine the partial sums, which reduces the chance of losing track of carries Not complicated — just consistent..
Binary Subtraction: Rules and Examples
Binary subtraction mirrors decimal subtraction, but borrowing happens whenever you need to subtract 1 from 0. Since binary has no negative digits, you must borrow a group of 2 from the next column to the left.
The Rules of Binary Subtraction
- 0 − 0 = 0
- 1 − 0 = 1
- 1 − 1 = 0
- 0 − 1 = 1 (with a borrow of 1 from the next column)
That last rule is the one that trips up most beginners. When you borrow in binary, the 0 becomes 10 (which is 2 in decimal), and 10 − 1 = 1.
Step-by-Step Binary Subtraction Example
Let's subtract 1011 (11) from 1101 (13):
1 1 0 1
- 1 0 1 1
-----------
Working from right to left:
- 1 − 1 = 0
- 0 − 1 requires a borrow. The next column (1) becomes 0, and the 0 becomes 10. 10 − 1 = 1
- 0 − 0 = 0 (the column was reduced by the borrow)
- 1 − 1 = 0
The result is 0010, or simply 10 in binary, which equals 2 in decimal. Since 13 − 11 = 2, the answer is correct.
Borrowing Across Multiple Columns
Sometimes the column you want to borrow from contains a 0. Take this case: subtracting 1 from 1000 requires borrowing from the leftmost 1, turning the number into 0111 + 1, which yields 0111 (7). In that case, you must look further left until you find a 1, then propagate the borrow back through the zeros. This chained borrowing is the binary equivalent of borrowing across zeros in decimal subtraction That's the whole idea..
Subtraction Using Two's Complement
Digital circuits rarely perform subtraction directly. Instead, they use a clever technique called two's complement, which converts subtraction into addition. This is how modern processors handle negative numbers and subtraction in a single arithmetic unit.
The method works in three steps:
1