• 450 likes • 904 Views
Computation in Positional Systems. Section 4.3. ADDITION. ADDITION. Example Add 33 4 and 13 4. 1. 33 4. 3 + 3 = 6. + 13 4. 13 4. But 6 is not a base 4 number. 2 4. 1 R 2. 4. 6. So 3 4 + 3 4 = 12 4. ADDITION.
E N D
Computation in Positional Systems Section 4.3
ADDITION Example Add 334 and 134. 1 334 3 + 3 = 6 + 134 134 But 6 is not a base 4 number. 24 1 R 2 4 6 So 34 + 34 = 124
ADDITION Example Add 334 and 134. 1 334 1 + 3 + 1 = 5 + 134 But 5 is not a base 4 number. 11 24 1 R 1 4 5 So 14 + 34 + 14= 114
ADDITION Example Add 1112 and 1012. 1 1112 1 + 1 = 2 + 1012 1012 But 2 is not a base 2 number. 02 1 R 0 2 2 So 12 + 12 = 102
ADDITION Example Add 1112 and 1012. 1 1 1112 1 + 1 + 0 = 2 + 1012 But 2 is not a base 2 number. 0 02 1 R 0 2 2 So 12 + 12+ 02= 102
ADDITION Example Add 1112 and 1012. 1 1 1112 1 + 1 + 1 = 3 + 1012 But 3 is not a base 2 number. 11 0 02 1 R 1 2 3 So 12 + 12+ 12= 112
ADDITION Example Add 5246 and 2146. 1 5246 4 + 4 = 8 + 2146 2146 But 8 is not a base 6 number. 26 1 R 2 6 8 So 46 + 46 = 126
ADDITION Example Add 5246 and 2146. 1 5246 1 + 2 + 1 = 4 + 2146 And 4 is a base 6 number. 4 26
ADDITION Example Add 5246 and 2146. 1 5246 5 + 2 = 7 + 2146 But 7 is not a base 6 number. 11 4 26 1 R 1 6 7 So 56 + 26 = 116
SUBTRACTION Example Subtract 124 from 314. 1 + 4 = 5 3 – 1 = 2 2 5 We cannot subtract 2 from 1, so we need to borrow. 314 – 124 124 1 34 Since we are in base 4, we will borrow 1 from column to left and ADD 4 where needed. Usually, we stick a 1 in front, but this is because we are in base 10 and we are adding 10. Now subtract.
SUBTRACTION Example Subtract 235 from 415. 1 + 5 = 6 4 – 1 = 3 3 6 We cannot subtract 3 from 1, so we need to borrow. 415 – 235 235 1 35 Since we are in base 5, we will borrow 1 from column to left and ADD 5 where needed. Now subtract.
SUBTRACTION Example Subtract 12425 from 34315. 3 – 1 = 2 1 + 5 = 6 2 6 We cannot subtract 2 from 1, so we need to borrow. 34315 – 12425 12425 45 Since we are in base 5, we will borrow 1 from column to left and ADD 5 where needed. Now subtract.
SUBTRACTION Example Subtract 12425 from 34315. 4 – 1 = 3 2 + 5 = 7 7 2 3 6 We cannot subtract 4 from 2, so we need to borrow. 34315 – 12425 45 3 Since we are in base 5, we will borrow 1 from column to left and ADD 5 where needed. Now subtract.
SUBTRACTION Example Subtract 12425 from 34315. 7 2 3 6 We can subtract 2 from 3. 34315 – 12425 45 3 1
SUBTRACTION Example Subtract 12425 from 34315. 7 2 3 6 We can subtract 1 from 3. 34315 – 12425 45 3 2 1
SUBTRACTION Example Subtract 32367 from 51447. 4 – 1 = 3 4 + 7 = 11 3 11 We cannot subtract 6 from 4, so we need to borrow. 51447 32367 – 32367 57 Since we are in base 7, we will borrow 1 from column to left and ADD 7 where needed. Now subtract.
SUBTRACTION Example Subtract 32367 from 51447. 3 11 We can subtract 3 from 3. 51447 – 32367 0 57
SUBTRACTION Example Subtract 32367 from 51447. 5 – 1 = 4 1 + 7 = 8 4 8 3 11 We cannot subtract 2 from 1, so we need to borrow. 51447 – 32367 0 57 6 Since we are in base 7, we will borrow 1 from column to left and ADD 7 where needed. Now subtract.
SUBTRACTION Example Subtract 32367 from 51447. 4 8 3 11 We can subtract 3 from 4. 51447 – 32367 0 1 57 6
SUBTRACTION Example Subtract 1E9A16from 3B2416. 11 First let’s substitute the values for the letters of base 16. 3B2416 3B2416 – 1E9A16 1E9A16 14 10 – 1E9A16 10 11 12 13 14 15 Base 16 digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F
SUBTRACTION Example Subtract 1E9A16from 3B2416. 1 20 11 We cannot subtract 10 from 4, so we need to borrow. 3B2416 14 10 – 1E9A16 A16 Since we are in base 16, we will borrow 1 from column to left and ADD 16 where needed. 10 4 + 16 = 20 2 – 1 = 1 Now subtract. 10 11 12 13 14 15 Base 16 digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F
SUBTRACTION Example Subtract 1E9A16from 3B2416. 17 10 1 20 11 We cannot subtract 9 from 1, so we need to borrow. 3B2416 14 10 – 1E9A16 A16 8 Since we are in base 16, we will borrow 1 from column to left and ADD 16 where needed. 10 1 + 16 = 17 11 – 1 = 10 Now subtract. 10 11 12 13 14 15 Base 16 digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F
SUBTRACTION Example Subtract 1E9A16from 3B2416. 26 17 10 1 20 2 11 We cannot subtract 14 from 10, so we need to borrow. 3B2416 14 10 – 1E9A16 A16 8 C 1 Since we are in base 16, we will borrow 1 from column to left and ADD 16 where needed. 12 10 3 – 1 = 2 10 + 16 = 26 Now subtract. And subtract again. 10 11 12 13 14 15 Base 16 digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F
MULTIPLICATION Example Multiply 346 by 26. Multiplication is repeated additions. Thus, many steps are the same. 1 346 26 26 26 4 2 = 8 But 8 is not a base 6 number. 1 R 2 6 8 So 46 26 = 126
MULTIPLICATION Example Multiply 346 by 26. 1 346 3 2 = 6, then adding the carried 1, 6 + 1 = 7 26 26 11 But 7 is not a base 6 number. 1 R 1 6 7 So 36 26+ 16 = 116
MULTIPLICATION Example Multiply 457 by 37. 2 457 37 37 17 5 3 = 15 But 15 is not a base 7 number. 2 R 1 7 15 So 57 37 = 217
MULTIPLICATION Example Multiply 457 by 37. 2 457 4 3 = 12, then adding the carried 2, 12 + 2 = 14 37 17 20 But 14 is not a base 7 number. The test will only cover multiplication by a single digit number, as here. 2 R 0 7 14 So 47 37+ 27 = 207
DIVISION Example Divide 2224 by 34. Division is multiplication done backwards. Since we have not memorized the multiplication tables for various bases, we will need to construct a multiplication table to help us. 2 2 = 4 not a base 4 number 1 R 0 4 4
DIVISION Example Divide 2224 by 34. Division is multiplication done backwards. Since we have not memorized the multiplication tables for various bases, we will need to construct a multiplication table to help us. 2 3 = 6 not a base 4 number 1 R 2 4 6
DIVISION Example Divide 2224 by 34. Division is multiplication done backwards. Since we have not memorized the multiplication tables for various bases, we will need to construct a multiplication table to help us. 3 3 = 9 not a base 4 number 2 R 1 4 9
DIVISION Example Divide 2224 by 34. Since 3434=214, write 3 on top and 21 below. Since 3424=124, write 2 on top and 12 below. Look for 12, or closest number, in the table using a 3. 3 will not divide into 2. 3 will divide into 22. Look for closest number in the table using a 3. Bring down next digit. 3 24 2 34 2 2 24 Subtract. Subtract. – 2 1 2 1 1 2 – 1 2 0
DIVISION Example Divide 1124 by 24. Since 2434=124, write 3 on top and 12 below. Since 2424=104, write 2 on top and 10 below. Bring down next digit. Look for 12, or closest number, in the table using a 2. 2 will divide into 11. Look for closest number in the table using a 2. 2 will not divide into 1. 34 2 3 24 1 1 24 Subtract. – 1 0 1 0 Subtract. 1 2 – 1 2 0
DIVISION Example Divide 23215 by 45. First we construct a multiplication table. We only really need the row for multiplication with 4, since that is the divisor. 4 1 = 4 4 2 = 8 not a base 5 number 1 R 3 5 8
DIVISION Example Divide 23215 by 45. First we construct a multiplication table. We only really need the row for multiplication with 4, since that is the divisor. 4 3 = 12 not a base 5 number 2 R 2 5 12
DIVISION Example Divide 23215 by 45. First we construct a multiplication table. We only really need the row for multiplication with 4, since that is the divisor. 4 4 = 16 not a base 5 number 3 R 1 5 16
DIVISION Example Divide 23215 by 45. Since 45 35 = 225, write 3 on top and 22 below. 4 will not divide into 2. 4 will divide into 23. Look for closest number in the table using a 4. 3 Subtract. Bring down next digit. 45 2 3 2 15 – 2 2 2 2 1 2
DIVISION Example Divide 23215 by 45. Since 45 15 = 45, write 1 on top and 4 below. Subtract. HOWEVER, we must borrow! Bring down next digit. Look for 12, or closest number, in the table using a 4. 1 3 45 2 3 2 15 – 2 2 7 0 1 2 – 4 1 3
DIVISION If a division problem has a remainder, simple note it (do not find decimal result). Example Divide 23215 by 45. Since 45 45 = 315, write 4 on top and 31 below. Look for 31, or closest number, in the table using a 4. Subtract. 4 45 1 3 45 2 3 2 15 – 2 2 7 0 1 2 – 4 1 3 – 3 1 0
Homework From the Cow book 4.1 pg 168 # 1 – 49 EOO, 61, 62 4.2 pg175 # 1 – 37 EOO, 49 4.3 pg181 # 1 – 33 EOO, 35, 37 NOTE: EOO means “every other odd”