Binary Addition (How To Guide With Rules And Examples)

💡
Key learnings:
  • Binary Addition Definition: Binary addition is defined as the process of adding two binary numbers, following specific rules for carrying over digits.
  • Basic Addition Rules: The rules include 0+0=0, 1+0=1, 0+1=1, and 1+1=0 with a carry-over of 1.
  • Step-by-Step Process: Start from the least significant bit, add digits, and handle carry-overs accordingly.
  • Example Calculation: Adding A = 10010101 and B = 10000110 demonstrates the binary addition process.
  • Applications in Electronics: Binary addition is essential in digital electronics, especially in the functioning of logic gates like XOR.

How to Add Binary Numbers

binary arithmetic uses the same place-value idea as decimal arithmetic, but each digit is either 0 or 1. This guide explains binary addition one column at a time.

Addition is one of the four basic arithmetic operations. The other three are binary subtraction, binary multiplication and binary division.

Long binary addition starts at the least significant bit on the right. Add each pair of bits and any carry-in, write the sum bit, then pass the carry to the next column on the left.

The four two-bit cases are 0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, and 1 + 1 = 10 in base 2. In the last case, write 0 in the current column and carry 1 to the next column.

The binary number system has only the digits 0 and 1, so these four cases cover every pair of input bits. A carry-in creates additional column totals: 0 + 0 + 1 = 1, 0 + 1 + 1 = 10 and 1 + 1 + 1 = 11.

The following example shows how a carry moves from one column to the next.

Let A = 10010101 and B = 10000110. In decimal, these values are 149 and 134, so the expected sum is 283, or 100011011 in binary.

To calculate A + B by binary addition, align the rightmost bits and work from right to left.

The least significant column contains 1 from A and 0 from B. Because 1 + 0 = 1, write 1 with no carry.

In the next column, 0 + 1 = 1, again with no carry.

The third column gives 1 + 1 = 10 in binary. Write 0 in that column and carry 1 into the fourth column.

The fourth-column inputs are 0 and 0, plus the carry-in of 1. Their total is 1, so write 1 and clear the carry.

The fifth column gives 1 + 0 = 1.

The sixth column gives 0 + 0 = 0.

The seventh column also gives 0 + 0 = 0.

In the most significant input column, 1 + 1 = 10. Write 0 in that column and place the final carry 1 to its left. The result is therefore 100011011.

In digital electronics, adders implement binary arithmetic with logic gates. For a half-adder, an XOR gate produces the one-bit sum and an AND gate produces the carry. A full adder also accepts a carry-in, so XOR alone does not perform complete multi-bit binary addition. In a fixed-width unsigned result, a final carry beyond the available width indicates overflow.

Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Electrical4U

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.

Leave a Comment