Add binary numbers - how it works
Related Videos: How To Add Binary Numbers - The Easy Way! (May 2024).
Adding binary numbers sounds difficult at first. But you don't even need a computer to do this. You only need to know the basic concepts of mathematics and remember a little rule.
Adding binary numbers - simple math
When adding binary numbers, the basic concepts of mathematics apply - with one exception.
- If you want to add binary numbers, it is best to take a piece of paper and write the numbers one below the other - just as you would add up other numbers.
- The addition rules also apply to binary numbers. However, the calculation is particularly simple here, since binary numbers only consist of the digits 0 and 1.
- If you have written the binary numbers one below the other, start adding: First the last digit. As I said, the normal math rules apply. So 0 + 1 results in a 1. Likewise, the combination 1 + 0. If there are two zeros one below the other, this logically results in 0: 0 + 0 = 0.
- There is only one rule that deviates from normal addition, and that is 1 + 1. In mathematics this would result in 2. However, binary numbers consist only of zeros and ones. So the following applies here: 1 + 1 = 0. BUT: you remember a 1 and add this to the next number, so make a carry over. As you know it from normal addition.
- For a better understanding we show the addition of binary numbers using an example.
Binary numbers add up even without a computer - an illustrative example
A simple calculation shows how easy it is to add binary numbers. Let's say you want to add binary numbers 1011 and 0110. Converted, the binary numbers stand for the natural numbers 11 and 6. How you convert binary and hexadecimal numbers is shown in another practical tip.
- Write the two numbers one below the other and draw a line underneath. Now start adding - just like you would add any other number.
- The last digits of the numbers are 1 and 0. 1 + 0 equals 1, so note the 1 as the last digit of the result.
- The penultimate digits of the two binary numbers are 1 and 1. As explained in the first section, 1 + 1 results in 0 here and you remember a 1.
- Now the next combination of digits follows. Here you have 0 + 1, plus the carryover of 1. The calculation is therefore 0 + 1 + 1. Since 1 + 1 result in a 0, write a 0 underneath the line and a 1 as a carry.
- The same thing happens with the following number: Here you have 1 + 0 and again 1 as carry, i.e. 1 + 0 + 1. The result is again 0 with a 1 as carry.
- Since there are no more digits and the carry 1 stands alone, just write them down to the result. So here should be 10001 - the result of adding the binary numbers 1011 and 0110. If you convert the result into a decimal system, you get the 17 - and that is the sum of 11 + 6.
In our next practical tip, we'll show you how to convert ASCII letters to binary numbers.