slide7 - CPSC 321 Computer Architecture Arithmetic 3 ALU...

Info iconThis preview shows pages 1–20. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CPSC 321 Computer Architecture Arithmetic 3 ALU Design Integer Addition, Multiplication & Division Adapted from David H. Albonesi Copyright David H. Albonesi and the University of Rochester. E. J. Kim Integer multiplication Pencil and paper binary multiplication 1000 (multiplicand) 1001 (multiplier) x Integer multiplication 1000 (multiplicand) 100 1 (multiplier) 1000 x Pencil and paper binary multiplication Integer multiplication 1000 (multiplicand) 10 1 (multiplier) 1000 00000 x Pencil and paper binary multiplication Integer multiplication 1000 (multiplicand) 1 01 (multiplier) 1000 00000 x 000000 Pencil and paper binary multiplication Integer multiplication 1000 (multiplicand) 1 001 (multiplier) 1000 00000 1000000 x 000000 Pencil and paper binary multiplication Integer multiplication 1000 (multiplicand) 1001 (multiplier) 1001000 (product) 1000 00000 +1000000 x 000000 (partial products) Pencil and paper binary multiplication Integer multiplication Pencil and paper binary multiplication Key elements Examine multiplier bits from right to left Shift multiplicand left one position each step Simplification: each step, add multiplicand to running product total, but only if multiplier bit = 1 1000 (multiplicand) 1001 (multiplier) 1001000 (product) 1000 00000 +1000000 x 000000 (partial products) Integer multiplication Initialize product register to 0 1000 (multiplicand) 1001 (multiplier) 00000000 (running product) Integer multiplication Multiplier bit = 1: add multiplicand to product 1000 100 1 (multiplier) +1000 00000000 00001000 (new running product) (multiplicand) Integer multiplication Shift multiplicand left 1001 (multiplier) +1000 00000000 00001000 10000 (multiplicand) Integer multiplication Multiplier bit = 0: do nothing 10 1 (multiplier) +1000 00000000 10000 (multiplicand) 00001000 Integer multiplication Shift multiplicand left 1001 (multiplier) +1000 00000000 100000 (multiplicand) 00001000 Integer multiplication Multiplier bit = 0: do nothing 1 01 (multiplier) +1000 00000000 100000 (multiplicand) 00001000 Integer multiplication Shift multiplicand left 1001 (multiplier) +1000 00000000 1000000 (multiplicand) 00001000 Integer multiplication Multiplier bit = 1: add multiplicand to product 1 001 (multiplier) +1000 00000000 00001000 1000000 (multiplicand) +1000000 01001000 (product) Integer multiplication 32-bit hardware implementation Multiplicand loaded into right half of multiplicand register Product register initialized to all 0s Repeat the following 32 times If multiplier register LSB=1, add multiplicand to product Shift multiplicand one bit left Shift multiplier one bit right LSB Integer multiplication Algorithm Integer multiplication Drawback: half of 64-bit multiplicand register are...
View Full Document

This note was uploaded on 03/23/2011 for the course CPSC 321 taught by Professor Staff during the Spring '08 term at Texas A&M.

Page1 / 114

slide7 - CPSC 321 Computer Architecture Arithmetic 3 ALU...

This preview shows document pages 1 - 20. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online