Binary Addition
Binary addition is carried out in the same way as with decimal numbers. Binary addition is vital in the way a computer processes information. The addition process is used to calculate the addition of numbers and the multiplication of numbers by adding values over and over to represent the multiplication sum. For example 5 x 4 would see 0101 added to 0101 4 times.
In computing, negative numbers are altered so that they are store in a different way. This allows them to be used in subtraction and division calculations in the same way as addition and multiplication calculations. Therefore, binary addition is very important and fundamental to processing!
The rules of Binary Addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1
Example
Add together 1011 + 0101
1. Align the numbers as you would with Decimal numbers.
1101 +
0101
2. Add column by column applying the rules of binary addition
1101 +
0101
Carry 1_1_
_______
10010
Check - 1101 equates to 13; 0101 equates to 5
13 + 5 = 18
10010 equates to 18
Watch this video to see some worked explanations
Binary Shift
The other arithmetic operations you may be asked to perform are to multiply or divide a binary number by 2. This is done using a binary shift, which is less complicated than it sounds.
All it means is that every digit in the number is moved one place.
- To multiply, the digits are moved one place to the left. A "0" is inserted in the rightmost position.
- To divide, the digits are moved one place to the right, and the rightmost digit is discarded.
Binary shifts can't deal with fractions very well. If you are right-shifting "111" (denary 7), for example, it becomes "011" (denary 3).
Watch this video for an explanation of binary shift