Presentation is loading. Please wait.

Presentation is loading. Please wait.

Morgan Kaufmann Publishers

Similar presentations


Presentation on theme: "Morgan Kaufmann Publishers"— Presentation transcript:

1 Morgan Kaufmann Publishers
June 15, 2018 Ch 3: Multiplication Instructor: Robert Utterback Lecture 28 Chapter 1 — Computer Abstractions and Technology

2 Sequential Version of Multiplication Algorithm and Hardware
Morgan Kaufmann Publishers Sequential Version of Multiplication Algorithm and Hardware 15 June, 2018 Start with long-multiplication approach multiplicand 1000 × 1001 0000 multiplier product Length of product is the sum of operand lengths Chapter 3 — Arithmetic for Computers

3 Multiplication Hardware
Morgan Kaufmann Publishers 15 June, 2018 Multiplication Hardware First version of Multiplication Hardware 32-bit multiplier 64-bit ALU 64-bit product (initialized to 0) Unsigned numbers! Chapter 3 — Arithmetic for Computers

4 Multiplication Hardware
Morgan Kaufmann Publishers 15 June, 2018 Multiplication Hardware Try an example: 2 * 3 with just 4 bits Table: Iteration #, Step (1a,2,3), Multiplier, Multiplicand, Product Initially 0 Chapter 3 — Arithmetic for Computers — 4 Chapter 3 — Arithmetic for Computers

5 Morgan Kaufmann Publishers
June 15, 2018 Example 2*3 Now do an example with 8 bits: 0x62 * 0x12 Chapter 1 — Computer Abstractions and Technology

6 Signed Multiplication
Option 1: Multiply with absolute value Compute the correct sign at end Option 2: Previously algorithm almost works “Sign extend” when shifting Chapter 1 — Computer Abstractions and Technology — 6

7 Morgan Kaufmann Publishers
15 June, 2018 Optimized Multiplier Refined Multiplier 32-bit multiplicand and ALU Multiplier is placed in the right half of the product register 64-bit product register Chapter 3 — Arithmetic for Computers

8 Morgan Kaufmann Publishers
15 June, 2018 Optimized Multiplier Perform steps in parallel: add/shift One cycle per partial-product addition That’s ok, if frequency of multiplications is low Chapter 3 — Arithmetic for Computers — 8 Chapter 3 — Arithmetic for Computers


Download ppt "Morgan Kaufmann Publishers"

Similar presentations


Ads by Google