Binary Arithmetic Binary Addition: MODULE 3 - Number System Arithmetic
Binary Arithmetic Binary Addition: MODULE 3 - Number System Arithmetic
Binary works in the same way, except that only 0's and 1's can be used, instead of the whole spectrum of 0-9. This actually makes binary addition much simpler than decimal addition, as we only need to remember the following: 0+0=0 0+1=1 1+0=1 1 + 1 = 10 As an example of binary addition we have, 101 +101 a) To add these two numbers, we first consider the "ones" column and calculate 1 + 1, which (in binary) results in 10. We "carry" the 1 to the "tens" column, and the leave the 0 in the "ones" column. b) Moving on to the "tens" column, we calculate 1 + (0 + 0), which gives 1. Nothing "carries" to the "hundreds" column, and we leave the 1 in the "tens" column. c) Moving on to the "hundreds" column, we calculate 1 + 1, which gives 10. We "carry" the 1 to the "thousands" column, leaving the 0 in the "hundreds" column. 101 +101 1010 Another example of binary addition: 1011 +1011 10110 Note that in the "tens" column, we have 1 + (1 + 1), where the first 1 is "carried" from the "ones" column. Recall that in binary,
1 + 1 + 1 = 10 + 1 = 11
Binary subtraction
Subtraction Rules: 00=0 0 1 = 1 borrow 2 10=1 11=0
Binary is simplified as well, as long as we remember how subtraction and the base 2 number system. Let's first look at an easy example. 111 - 10 101 Note that the difference is the same if this was decimal subtraction. Also similar to decimal subtraction is the concept of "borrowing." Watch as "borrowing" occurs when a larger digit, say 8, is subtracted from a smaller digit, say 5, as shown below in decimal subtraction. 35 - 8 27 For 10 minus 1, 1 is borrowed from the "tens" column for use in the "ones" column, leaving the "tens" column with only 2. The following examples show "borrowing" in binary subtraction. 10 - 1 1 100 - 10 10 1010 - 110 100
Binary multiplication
Binary multiplication is actually much simpler than decimal multiplication. In the case of decimal multiplication, we need to remember 3 x 9 = 27, 7 x 8 = 56, and so on. In binary multiplication, we only need to remember the following, 0x0=0 0x1=0
1x0=0 1x1=1 Note that since binary operates in base 2, the multiplication rules we need to remember are those that involve 0 and 1 only. As an example of binary multiplication we have 101 times 11, 101 x11 First we multiply 101 by 1, which produces 101. Then we put a 0 as a placeholder as we would in decimal multiplication, and multiply 101 by 1, which produces 101. 101 x11 101 1010 <-- the 0 here is the placeholder The next step, as with decimal multiplication, is to add. The results from our previous step indicates that we must add 101 and 1010, the sum of which is 1111. 101 x11 101 1010 1111
Binary division
Binary division is almost as easy, and involves our knowledge of binary multiplication. Take for example the division of 1011 into 11. 11 R=10 11 )1011 -11 101 -11 10 <-- remainder, R To check our answer, we first multiply our divisor 11 by our quotient 11. Then we add its' product to the remainder 10, and compare it to our dividend of 1011. 11 x 11 11
11 1001 <-- product of 11 and 11 1001 + 10 1011 <-- sum of product and remainder The sum is equal to our initial dividend, therefore our solution is correct.
Note: Please research Octal and Hexadecimal arithmetic so that you could answer activity 2 and 3.
1. +
2. 1010102 + 1111102 -
3. 1100102 111012 -
4. 100000012 1110102
5. 101112 X 10112
6.
1012101112
1.
7. 3468/ 258 =
12
1.
BEEF16 + ED916
2. 456716 + B3C16
3. B10A16 - 32C916
4. 67FE 16 - 506F16
5. 45616 x 6716
6. A2316 X BD16
7. 78968 / 568