Describe the advantage of using Booth algorithm?
Ans: a) It achieves efficiency in the number of additions needed when the multiplier has a few large blocks of 1's.
b) It handles positive and negative both multiplier uniformly.
c) The speed achieved by skipping 1's depends on the data.
QUE 7. Write restoring division algorithm.
Ans: Algorithm is following:
Do the following for n times:
I. Shift A and Q left one binary position.
II. Subtract M and A and place the answer back in A.
III. If the sign of A is 1, set q0 to 0 and add M back to A. Where M=> Divisor, A=>Accumulator, Q=> Dividend.
Step 1: Do the following for n times:
I. If the sign of A is 0 , shift A and Q left 1 bit position and subtract M from A;
Or else, shift A and Q left and add M to A.
II. Now, if the sign of A is 0, set q0 to 1; or else, set q0 to0.
Step 2: if A's sign is 1, add M to A.