Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 5 Multiplication and Division

Similar presentations


Presentation on theme: "Lecture 5 Multiplication and Division"— Presentation transcript:

1 Lecture 5 Multiplication and Division
ECE 0142 Computer Organization Lecture 5 Multiplication and Division

2 Recitation Multiplying two numbers in 2’s complement, using the best hardware we learned (pp. 25) 11010  0101 0101  11010

3 Recitation (Implementation 3)
Let’s do x 0101 (-6 x 5 = -30) Iteration Implementation 3 Step Multiplier Multiplicand Product|Multiplier initial values 0101 11010 1 1: 1 -> product = product + multiplicand 2: Multiplier shift right/ Product shift right ×010 2 1: 0 -> no op ××01 3 ×××0 4 ××××

4 Recitation (Implementation 3)
Let’s do 0101 x (5 x -6 = -30) Iteration Implementation 3 Step Multiplier Multiplicand Product|Multiplier initial values 11010 0101 1 1: 0 -> no op 2: Multiplier shift right/ Product shift right ×1101 2 1: 1 -> product = product + multiplicand ××110 3 ×××11 4 ××××1 5 1: 1 -> product = product - multiplicand ××××1 0101 2: Multiplier shift right/ Product shift right ×××××

5 Use Booth Alg. Solve 

6 Booth’s Algorithm Example
Let’s do 0110 x (6 x -3) Iteration Implementation 3 Step Multiplicand Product initial values 0110 1 00 -> no op shift right 2 3 4 10 -> product = product – multiplicand 5 11 -> no op 0110 shift right 6 11 -> no op 0110 shift right 7 00 -> no op 0110 shift right


Download ppt "Lecture 5 Multiplication and Division"

Similar presentations


Ads by Google