Binary Addition: Meaning, Rules and Example

binary addition
Image source: Redbubble

Binary addition is performed by adding the digits starting from the right side of the numbers, in the same way as two or more base 10 integers are added. The place values in binary addition are given as ones, twos, fours, eights, sixteens, and so on. We begin by adding the digits in the one’s column, then go to the left, adding the digits in the twos column, then the digits in the fours column, and so on. The only difference is that we regroup here when the sum of the digits exceeds 1. Let’s learn more about the rules guiding binary addition, as well as the concept of overflow, in this article.  

What is Binary Addition?

Except that it is a base 2 system, the binary addition operation functions identically to the base 10 decimal system. The binary system only has two digits, 1 and 0. It is used for the majority of computer system functions. The binary code employs the digits 1 and 0 to toggle specific processes on and off. By changing to the base 2, the process of addition is extremely similar to the decimal system.

Before beginning the binary addition procedure, we first understand how the place works in the binary number system. Because the binary operation is performed by most current digital computers and electronic circuits by expressing each bit as a voltage signal. Bit 0 denotes the “OFF” state, while bit 1 denotes the “ON” state.

One of the arithmetic operations on binary numbers or base-2 number systems is adding two or more binary numbers. When we add 3 + 2 in decimal addition, we obtain 5. Similarly, adding their binary equivalents, (11)2 and (10)2, yields (11)2 + (10)2 = (101)2, which is 5 in base-10. The results of binary and decimal addition yield the same answer; the only difference is in the digits’ place values. The procedure of binary addition will look quite familiar to you; the only difference is that in the decimal number system, once we reach the sum of the digits more than 9, we regroup the next place value since the decimal system uses ten digits from 0 to 9. However, when combining binary numbers, we regroup the next place value when the sum of the digits exceeds 1 because the binary number system only allows for two digits, 0 and 1.

Rules Of Binary Addition

Binary addition is much easier than the decimal addition when you remember the following tricks or rules. Using these rules, any binary number can be easily added. The four rules of binary addition are:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 =10

How Do You Do Binary Addition?

Binary numbers, which use the digits 0 and 1, are used in computers to store and represent data. Two cases arise while learning binary addition, and they are as follows:

  • Binary addition without regrouping
  • Binary addition with regrouping

Addition of Binary Values without Regrouping

When the sum of two digits is 0 or 1, we do not need to regroup when adding two or more binary values. Let’s add (101)2 and (10)2, which are the binary equivalents of 5 and 2, respectively.

Step 1: Write all the digits of both the numbers in separate columns as per their place values.

1 0 1

+ 1 0

———–

———–

Step 2: Start from the right-most column digits, 1 and 0. Apply one of the rules of binary addition which says 1 + 0 = 1.

1 0 1

+ 1 0

———–

1

————

Step 3: Move to the next column to the left. Here, we have two digits 0 and 1. Look at the rules given above and find out which rule will be applied here. Apply one of the binary addition rules which says 0 + 1 = 1.

1 0 1

+ 1 0

———–

1 1

————

Step 4: Now, in the last column, we have only 1 left, so we can apply the rule, 1 + 0 = 1.

1 0 1

+ 1 0

———-

1 1 1

———-

Therefore, by adding (101)2 with (10)2, we get (111)2 as the final answer.

Binary Addition With Regrouping

When the sum of two or more binary digits yields more than 0 or 1, regrouping is required. To better grasp it, let’s add binary integers (1001)2 and (111)2.

Step 1: Write all digits of both the binary numbers in a separate column according to their place values as shown below

1 0 0 1 

+ 1  1 1

………….

Step 2:  Starting from the rightmost column, add 1 and 1. Follow the binary addition rules which says 1 + 1 = 10. This is equivalent to 2₁₀. Hence, we will write 0 at the bottom and two take 1 as a carryover to the next place value. 

       1

1 0 0 1 

+ 1  1 1

………….

           0

Step 3: Move to the next column to the left. Follow the binary addition rules which says 1 + 0 + 1 = 10. This is again equivalent to 2₁₀. Hence, we will write 0 at the bottom and two take 1 as a carryover to the next place value. 

   1  1

1 0 0 1 

+ 1  1 1

………….

    0  0

Step 4:  Move again to the next column to the left. Follow the binary addition rules which says 1 + 1 + 0 = 10. This is again equivalent to 2₁₀.       

 1 1  1

1 0 0 1 

+ 1  1 1

………….

  0 0  0

Step 5: Move again to the next column to the left. Follow the binary addition rules which says 1 + 1 + 0 = 10. This is again equivalent to 2₁₀. As it is the last column left, we will not take 1 as carryover, instead, we will write 10 as the result at the bottom.

  1 1 1

   1 0  0  1 

 +    1  1  1

…………….

 1  0  0  0  0

…………….

Therefore, \[1001_{2} + 111_{2} =   10000_{2}\]

Binary Addition Table

The table for adding two binary numbers 0 and 1 is given below:

xyx+y
000
011
101
110      (where 1 is carried over)

You can see from this table that x and y are the two binary numbers. So when we give the input for x = 0 and y = 0, then the output is equal to 0. When x = 0 or 1 and y = 1 or 0, then x+y = 1. But when both x and y are equal to 1, then their addition equals to 0, but the carryover number will equal to 1, which means basically  1 + 1 = 10 in binary addition, where 1 is carry forwarded to the next digit.

Examples of Binary Addition

A few examples of binary additions are as follows:

Example 1: 10001 + 11101

Solution:

                1

      1 0 0 0 1

(+) 1 1 1 0 1

———————–

     1 0 1 1 1 0

Example 2: 10111 + 110001

Solution:

              1 1 1

            1 0 1 1 1

(+) 1 1 0 0 0 1

———————–

   1 0 0 1 0 0 0

Binary Addition Using 1’s Complement

  • The number 0 represents the positive sign
  • The number 1 represents the negative sign

Addition of Positive and Negative Number

Case 1: When a positive number has a greater magnitude

Take the 1’s complement of the negative number, and the carry is added to the resultant sum at the 1’s place. When you add the carry with the resultant, you will get the sum value.

Example:

+ 1111 and -1101

+ 1 1 1 1 = 0 1 1 1 1

– 1 1 0 1 = 1 0 0 1 0 (taking 1’s complement)

              ——————-

                0 0 0 0 1

                              1

               ———————

                0 0 0 1 0

Therefore, the solution is + 0010.

  • Case 2: When a negative number has a greater magnitude

Take the 1’s complement of the negative number, and there will be no end-around carrying in this case. Finally, the sum is obtained by taking the 1’s complement of the resultant.

Example:

+ 1111 and -1101

– 1 1 1 1 = 1 0 0 0 0 (taking 1’s complement)

+1 1 0 1 = 0 1 1 0 1

—————-

1 1 1 0

——————

1 0 0 1 0 (taking 1’s complement)

Addition of Two Negative Numbers

Take the 1’s complement of both the negative numbers and then add. The end around carrying will appear, and it will generate a number 1 in the sign bit. The sum value can be obtained by taking the 1’s complement of the resultant.

Example:

  • -1010 and – 0011
  • 1 0 1 0 = 1 0 1 0 1 (taking 1’s complement)
  • 0 0 1 1 = 1 1 1 0 0 (taking 1’s complement)

————————–

                         1 0 0 0 1

                                      1

—————————–

                         1 0 0 1 0

—————————-

1 1 1 0 1 (taking 1’s complement)

Therefore the solution is – 1101

Overflow In Binary Addition

Overflow in a binary addition frequently appears to be a last carry generation. Overflow, on the other hand, results in an inaccurate sum, whereas carry does not. If not understood correctly, this can be a little perplexing. So, let’s get a firm grasp on the overflow notion.

Assume you have a half-full tea cup. Your acquaintance has a container containing some tea. Him wants to know how much tea you and he have in total. As a result, he pours his tea into your cup. However, the overall volume of tea is greater than the size of your cup. When your friend poured his tea into your cup, the drink began to spill. The crucial thing to remember here is that if you pour more than the container’s capacity, it will overflow. This is analogous to the overflow idea in binary addition.

Let’s take an example to understand this.

overflow in binary addition

Overflow Explained

In the preceding example, we execute the addition 120 + 62. The answer should be 182, as illustrated in the diagram above. The binary addition, on the other hand, did not produce the correct sum. Now, even though we obeyed the basic laws of binary arithmetic, let’s figure out where things went wrong.

We used an 8-bit 2’s complement representation of numbers. Each number (120, 62) can be expressed using 7 magnitude bits, with one bit left for sign (‘0’ for both). However, the magnitude of the result (182 => 10110110) requires 8 bits. Because it is a 2’s complement 8-bit encoding, the sign bit is the 8th bit of the total. Because the sign bit in the total is ‘1’, it is a negative number. Furthermore, the size of the sum is inaccurate. The calculated total is now -74, when the actual result is 182. What caused this to occur?

This occurred because 182 is outside the range of signed numbers that may be represented by 8 binary bits. The generated sum, 182, requires 9 bits to be accurately represented in 2’s complement format. When we start with two n-bit values and the sum takes up n+1 bits, we get an overflow. In computers, overflow is an issue because the number of bits that hold a number is finite, and a result that exceeds the finite value by one cannot be handled.

Overflow vs Final Carryout

Philosophically, overflow and carry-out are synonymous. Both imply that the solution does not fit within the allotted area. When the most-significant bit is carried out, carry out is generated. When there is a carry into the most significant bit, the overflow occurs.

It can be seen in the instance of unsigned number arithmetic. However, the sum is not altered during the generation of carry out. The carry flag has been raised. The contents of the register containing the result, together with the carry, yield the proper sum.

Overflow occurs in the situation of signed number arithmetic. The amount, however, becomes damaged as a result of the formation of overflow. The overflow flag is set, indicating that the result is wrong.

In Conclusion,

Binary addition is one of the basic operations of binary systems. As we already know, the term “Binary Operation” refers to the fundamental mathematical operations that are performed on two operands. Binary addition is performed by adding the digits starting from the right side of the numbers, in the same way as two or more base 10 integers are added.

  1. BINARY TRADING: How it works
  2. Knowledge Management Systems: Detailed Guide
  3. 15+ BEST PHONE NUMBERS for Business in 2023
  4. DEPRECIATION: Definition, How to Calculate It, and Causes.
  5. E-Marketing: The Ultimate Guide (Updated)

References 

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like