l12 - Integer Multiplication Multiplying two numbers:...

Info iconThis preview shows pages 1–8. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Integer Multiplication Multiplying two numbers: multiplicand 1 1 multiplier 1 0 0 1 1 1 + 1 1 1 0 1 1 1 m-bits n-bits = ( m + n )-bit result m-bits: 2 m- 1 is the largest number (2 m- 1)(2 n- 1) = 2 m + n- 2 m- 2 n + 1 Integer Multiplication: First Try 64-bit product 64-bit multiplicand 32-bit multiplier control FSM shift_left shift_right lsb write alu_control 64 64 64 64b ALU How do we build this? Registers And Shift Registers Register with shift left: FF 1 1 FF FF FF 1 1 Q D Q D Q D Q D Register with write: FF 1 FF FF FF 1 1 1 Q D D Q D D Q Q Control check lsb to product add multiplicand start done shift multiplicand left by 1 shift multiplier right by 1 Y 1 iteration? 32nd N Integer Multiplication Observations: 32 iterations for multiplication 32 cycles How long does 1 iteration take? Suppose 5% of ALU operations are multiply ops , and other ALU operations take 1 cycle. CPI alu = 0 . 05 32 + 0 . 95 1 = 2 . 55 ! Half of the bits of the multiplicand are zero 64-bit adder is wasted 0's inserted when multiplicand shifted left product LSBs don't change Using A 32-Bit ALU 64-bit product 32-bit multiplier 32-bit multiplicand control FSM shift_right lsb write alu_control 32b ALU shift_right 32 32 top half 32 carry-out of adder New Control add is performed! lsb start done shift multiplier right by 1 to left product shift product reg right by 1 dont forget to shift in the Bottom half of product register is zero initially....
View Full Document

Page1 / 30

l12 - Integer Multiplication Multiplying two numbers:...

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

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