Topic Content:
- Binary Arithmetic Operations – Addition
Basic arithmetic operations of addition, subtraction, multiplication, and division are carried out in their bases similar to base 10.
Addition:
Below are rules of binary addition:
- 1 + 0 = 1
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 1 = 10
- 1 + 1 + 1 = 11
Rule | A + B | Sum (What we write down) | Carry (What we write carry) |
1. | 0 + 0 | 0 | 0 |
2. | 0 + 1 | 1 | 0 |
3. | 1 + 0 | 1 | 0 |
4. | 1 + 1 | 0 | 1 |
5. | 1 + 1 + 1 | 1 | 1 |
Remember that in base 10, 1 + 1 = 2, But 2 in base 2 is 10. therefore, in binary 1 + 1 = 10.
Worked Example 2.1.1:
Solve the following;
a. Add 111two and 101two
b. Add 1101two + 10001two + 1011two
c. 1.1011two + 10.1001two + 10.01two
d. 1011two + 1101two
e. 10011two + 1101two + 111two
Solution
a. Add 111two and 101two
Answer = 1100two
Explanation:
First column to the right: 1 + 1 = 10
Write the 0 and carry 1 {forward (1)}
Second column in the middle: (1) carried + 1 = 10.
Write down 0 and carry 1 {forward (1)}
Third column: 1 carried + 1 + 1 = 11
Write 1 and carry 1 to the last (fourth) column
Alternative Explanation:
1st Column (from right to left): 1 + 1 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 2.
2nd Column: 1 + 1 + 0 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 3.
3rd Column: 1 + 1 + 1 = 3. How many twos are there in 3? \( \frac{3}{2} \) = 1 remainder 1. Write 1 and carry 1 to column 4.
4th column: 1…Write 1.
Answer = 11002
b. Add 1101two + 10001two + 1011two
Alternative Explanation
1st Column (from right to left): 1 + 1 + 1 = 3. How many twos are there in 3? \( \frac{3}{2} \) = 1 remainder 1. Write 1 and carry 1 to column 2.
2nd Column: 1 + 0 + 0 + 1 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 3.
3rd Column: 1 + 1 + 0 + 0 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 4.
4th Column: 1 + 1 + 0 + 1 = 3. How many twos are there in 3? \( \frac{3}{2} \) = 1 remainder 1. Write 1 and carry 1 to column 5.
5th Column: 1 + 1 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 6.
6th Column: +1 …. Write 1.
Answer = 1010012
c. 1.1011two + 10.1001two + 10.01two
Alternative Explanation
1st Column (from right to left) = 1 + 1 + 0 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 2.
2nd Column = 1 + 1 + 0 + 0 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 3.
3rd Column = 1 + 0 + 0 + 1 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 4.
4th Column = 1 + 1 + 1 + 0 = 3. How many twos are there in 3? \( \frac{3}{2} \) = 1 remainder 1. Write 1 and carry 1 to column 5.
5th Column = 1 + 1 + 0 + 0 = 2. How many twos are there in 2? \( \frac{2}{2} \) = 1 remainder 0. Write 0 and carry 1 to column 6.
6th Column = 1 +1 + 1 = 3. How many twos are there in 3? \( \frac{3}{2} \) = 1 remainder 1. Write 1 and carry 1 to column 7.
7th column = 1…Write down 1
Answer = 110.10002
d. 1011two + 1101two
e. 10011two + 1101two + 111two
Work To Do:
1. 10011 + 1101
2. 1011 + 1101 + 101
Answers:
1. 100000two
2. 11101two