Question
i Pseudocode for a shift and add algorithm for multiplication of unsigned integers, which requires no dedicated hardware, is as follows where denotes the shift
i Pseudocode for a shift and add algorithm for multiplication of unsigned integers, which requires no dedicated hardware, is as follows
where denotes the shift left operator and the shift right operator7. Carry being set after a shift right is equivalent to the multiplier ending in 2 1 which is taken into account by adding half the new multiplicand (simply the old unshifted version) to the result register. Satisfy yourself, using examples, that you understand how the algorithm works. Suggest an additional step which precurses the algorithm to improve its performance over a large random set of pairs of operands. How might it be further extended to deal with signed operands?
ii Assuming the processor architecture described in question one, give the micro procedure, expressed in RTL, which implements a multiplication instruction employing the algorithm shown above (without extensions) given that the result, multiplier and multiplicand already occupy the active registers. (Remember to terminate it correctly.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started