What is Binary Addition?
Adding two or more binary numbers is one of the arithmetic operations on binary numbers or base-2 number systems. In decimal addition, when we add 3 + 2, we get 5. Similarly, when we add their binary equivalents, i.e (11)2 and (10)2, we get, (11)2 + (10)2 = (101)2, which is 5 in base-10. The results of both binary and decimal addition give us the same answer, the only difference is in the place values of the digits. The process of binary addition will look very familiar to you, the only difference is that in the decimal number system we regroup the next place value whenever we get the sum of the digits greater than 9 because in the decimal system we use 10 digits from 0 to 9. But while adding binary numbers, we regroup the next place value when the sum of the digits becomes greater than 1 as, in the binary number system, only two digits can be used, and those are 0 and 1.
Binary Addition Rules
The four rules that apply when two binary digits are added are given below:
Now, let us use these binary addition rules to learn the process of adding binary numbers.
Example:
How to Add Binary Numbers?
Binary numbers are used in computers to store and represent data using digits 0 and 1. There are two cases that come up while learning about binary addition, and those are given below:
- Binary addition without regrouping
- Adding binary numbers with regrouping
Binary Addition without Regrouping
When the addition of two digits results in 0 or 1, then we don’t need to regroup while adding two or more binary numbers. For example, let us 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.
Adding Binary Numbers with Regrouping
When the addition of two digits results in a number greater than 1, then we need to regroup while adding two or more binary numbers. For example, let us add (1001)2 and (111)2, which are the binary equivalents of 9 and 7 respectively.
- Step 1: Arrange the numbers as shown below.
- Step 2: Follow the binary addition rules to add the numbers. First let us add the digits in the one’s place, which are 1 + 1 = 0 (1 carryover). Here, 1 + 1 is 10, which is the binary equivalent of (2)10, so we are regrouping the twos column by taking 1 as a carryover.
- Step 3: Now, we move to the next place value towards left, which is twos place. Here, we have 0 + 1 + 1 (carryover) = 10. So, again we will write 0 and take 1 as a carryover to the next place value. In the next column, we have 0 + 1 + 1 = 10. Similarly, we again take 1 as a carryover to the next column. In the last column to the left, we have 1 + 1 (carryover) = 10.
Therefore, (1001)2 + (111)2 = (10000)2.
Example: Find the sum of the given binary numbers.
a) (11)2 + (10)2
b) (101)2 + (011)2
Solution: a) Given binary numbers are (11)2 and (10)2. Write both these numbers in columns as shown below:
1 1
+ 1 0
———-
1 0 1
———-
Therefore, (11)2 + (10)2 = (101)2
b) Given binary numbers are (101)2 and (011)2. Write both these numbers in columns as shown below:
1 0 1
+ 0 1 1
————-
1 0 0 0
————-
Therefore, (101)2 + (011)2 = (1000)2
Example: Add the following binary numbers: (0111)2 and (-1000)2
Solution: To add (0111)2 and (-1000)2, we first find the 1’s complement of -1000, which is 0111. Now, we add the 1’s complement to the given positive binary number 0111.
0 1 1 1
+ 0 1 1 1
————-
1 1 1 0
————-
Now, find the 1’s complement of 1110, which is 0001.
Therefore, (0111)2 + (-1000)2 = 0001