addition algorithm
DESCRIPTION
Addition AlgorithmTRANSCRIPT
![Page 1: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/1.jpg)
Algorithms for Integer Algorithms for Integer ArithmeticArithmetic
Algorithms for Integer Algorithms for Integer ArithmeticArithmeticAddition AlgorithmAddition Algorithm
![Page 2: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/2.jpg)
Three Steps to Adding Two Integers
STEP 1. Do they have the same sign?(both positive or both negative)
orDo they have opposite signs? (one positive and the other negative)
![Page 3: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/3.jpg)
Same Signs
9 11 20, ( 3) ( 17) 20
9 11 ?, ( 3) ( 17) ?
STEP 3. Now enter the sum of the absolute values: (add the magnitudes)
STEP 2. Enter the common sign:
9 11 , ( 3) (20 21 07)
![Page 4: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/4.jpg)
Opposite Signs
17 3 14
3 ( 17) ?
STEP 3. Enter the difference of the larger magnitude and the smaller:
STEP 2. Enter the sign of the number having the larger magnitude:
3 ( 17 14)
3 ( 17) 14
![Page 5: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/5.jpg)
Work it out!
12 ( 34 22)
![Page 6: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/6.jpg)
Step 1
12 ( 34 22)
They have opposite signs.
Same or opposite signs?
![Page 7: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/7.jpg)
Step 2
12 ( 34 22)
Enter the sign of the number having the larger magnitude:
|-34| = 34 > 12 = |12|
![Page 8: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/8.jpg)
Step 3
12 ( 34) 22
Subtract the smaller magnitude from the larger and enter the result.
![Page 9: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/9.jpg)
Work it out!
29 114 5
![Page 10: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/10.jpg)
Step 1
29 14 29 ( 14)
They have opposite signs.
Same or opposite signs?
![Page 11: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/11.jpg)
Step 2
29 114 5
Enter the sign of the number having the larger magnitude:
|29| = 29 > 14 = |-14|
![Page 12: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/12.jpg)
Step 3
29 14 15
Subtract the smaller magnitude from the larger and enter the result.
![Page 13: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/13.jpg)
Work it out!
12 14 6
![Page 14: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/14.jpg)
Step 1
12 14 6
They are both positive.
Same or opposite signs?
![Page 15: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/15.jpg)
Step 2
12 14 6
The sign is positive.
![Page 16: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/16.jpg)
Step 3
12 4 16
Add the magnitudes and enter the result.
![Page 17: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/17.jpg)
Work it out!
( 2) ( 119)
![Page 18: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/18.jpg)
Step 1
( 2) ( 119)
They are both negative.
Same or opposite signs?
![Page 19: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/19.jpg)
Step 2
( 2) ( 119)
The sign is negative.
![Page 20: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/20.jpg)
Step 3
( 2) ( 9) 11
Add the magnitudes and enter the result.
![Page 21: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/21.jpg)
Adding Many Integers
2 8 7 3 2 ( 8) 7 ( 3)
1. Add all the positive numbers and add all the negative numbers:
2 7 9 , ( 8) ( 3) 11
2. Add the two signed numbers:9 ( 11) 2Answer.
![Page 22: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/22.jpg)
12 14 6
Work it out!
![Page 23: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/23.jpg)
12 4 16
Work it out!
![Page 24: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/24.jpg)
16( 12) 4
Work it out!
![Page 25: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/25.jpg)
( 12) 4 16
Work it out!
![Page 26: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/26.jpg)
(2 4 1) (( 5) ( 3))
7
2 4 ( 5) ( 3
)
) 1
( 8 1
Work it out!
![Page 27: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/27.jpg)
2 4 ( 5) ( 3) 1
(2 4 1) ((
7 (
5) ( 3))
8) 1
Work it out!
![Page 28: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/28.jpg)
2 4 ( 5) ( 3) 1
(2 4 1) (( 5) ( 3))
7 ( 18)
Work it out!
![Page 29: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/29.jpg)
2 4 ( 5) ( 3) 1
(2 4 1) (( 5) ( 3))
7 ( 8) 1
Work it out!
![Page 30: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/30.jpg)
9 2 4 (4 1 3)
15 8
4 2
7
9 1 4 3
Work it out!
![Page 31: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/31.jpg)
9 4 2 1 4 3
9 2 4 (
15
4 1 3)
8 7
Work it out!
![Page 32: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/32.jpg)
9 4 2 1 4 3
9 2 4 (4 1 3)
15 78
Work it out!
![Page 33: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/33.jpg)
9 4 2 1 4 3
9 2 4 (4 1 3)
15 8 7
Work it out!
![Page 34: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/34.jpg)
12.7 1.3 5.0
12.7 1.3 1
(15.6
5.6 5.0 3.4
3.4)
19.0 19.0 0
Work it out!
![Page 35: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/35.jpg)
12.7 1.3 15.6 5.0 3.4
12.7 1.3 5.0 (15.6 3.4)
19.0 19.0 0
Work it out!
![Page 36: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/36.jpg)
12.7 1.3 15.6 5.0 3.4
12.7 1.3 5.0 (15.6 3.4)
19.0 1 09.0
Work it out!
![Page 37: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/37.jpg)
12.7 1.3 15.6 5.0 3.4
12.7 1.3 5.0 (15.6 3.4)
19.0 19.0 0
Work it out!
![Page 38: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/38.jpg)
Work it out!
100 7
2 5 7 3
2 5 7
4 6
4
1
3 6
7
Rigid use of an algorithm is not always best.
![Page 39: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/39.jpg)
Work it out!
100 7
2 5 7 3 4 6
2 7 13 75 4 6
![Page 40: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/40.jpg)
Work it out!
100 7
2 5 7 3 4 6
2 5 7 3 4 6 17
![Page 41: Addition Algorithm](https://reader034.vdocument.in/reader034/viewer/2022042518/55617cdbd8b42ade208b52c7/html5/thumbnails/41.jpg)
Moral
Look before you leap!
Many problems can be worked in your head if you do things in the right order.
2 5 7 3 4 6 17