Adding binary
When two numbers are added together in denaryThe number system most commonly used by people. It contains 10 unique digits 0 to 9. Also known as decimal or base 10., we take the first number, add the second number to it and get an answer. For example, 1 + 2 = 3.
When we add two binaryA number system that contains two symbols, 0 and 1. Also known as base 2. numbers together the process is different.
There are four rules that need to be followed when adding two binary numbers. These are:
- 0 + 0 = 0
- 1 + 0 = 1
- 1 + 1 = 10 (said one zero and is binary for 2)
- 1 + 1 + 1 = 11 (said one one and is binary for 3)
Example
Let’s try adding together two binary numbers: 0101 0011 and 0111 0110.
To get to the answer, use the following method:
Image caption, 1. Starting at the right-hand side, the first sum is 1 + 0 = 1. Put 1 in the answer row below
Image caption, 2. Move to the next numbers to the left. The second sum is 1 + 1 = 10. Put 0 in the answer row below and carry 1 over to the next sum
Image caption, 3. Move to the next numbers to the left. There is a carry of 1, so ignore the top 0 and use the carry, so the third sum is 1 + 1 = 10. Put 0 in the answer row below and carry 1 over to the next sum
Image caption, 4. In the next sum to the left, ignore the top 0 again and use the carry, so the fourth sum is 1 + 0 = 1. Put 1 in the answer row below
Image caption, 5. In the next sum to the left there is no carry, so the fifth sum is 1 + 1 = 10. Put 0 in the answer row below and carry 1 over to the next sum
Image caption, 6. In the next sum to the left there is a carry of 1, ignore the top 0 and use the carry, so the sixth sum is 1 + 1 = 10. Put 0 in the answer row below and carry 1 over to the next sum
Image caption, 7. In the next sum to the left there is a carry of 1. This time, as the top number is a 1, it is used and not ignored like a 0, so the seventh sum is 1 + 1 + 1 = 11. Put 1 in the answer row below and carry 1 over to the next sum
Image caption, 8. In the last sum to the left, ignore the top 0 again and use the carry, so the final sum is 1 + 0 = 1. Put 1 in the answer row below
Image caption, 9. This gives us the answer of 11001001. We can check the answer by converting all three number back to denary and checking the sum is correct
1 of 9