Question

In: Computer Science

2. Show the trace of the RTL code for Booth's algorithm for X = 0111 and...

2. Show the trace of the RTL code for Booth's algorithm for X = 0111 and Y = 1011.

Solutions

Expert Solution

Solution:

Booth's Multiplication for X= 0111 , Y =1011 is shown below:

Booths algorithm check the values of Q0Q-1 ?

If Q0Q-1 =00 or 11 Do Just Arithmetic Right Shift(ARS) of A,Q Q0

If Q0Q-1 =10 Do A <- A - M then Just Arithmetic Right Shift(ARS) of A,Q Q0

If Q0Q-1 =01 Do A <- A + M then Just Arithmetic Right Shift(ARS) of A,Q Q0

Here A is Accumulator, Q is Multiplier , M is Multiplicand, Q0 is LSB of Q and Q-1 is next digit to Q0

Here x =0111 ( Multiplicand)

Y=1011 ( Multiplier)

Step Count

'n'

A Q Q-1 M Description
4 0000 1011 0 0111 Intialised

4

3

1001

1100

1011

1101

0

1

0111

0111

Step-1, Compare Q0Q-1 =10

So A = A-M then ASR A Q Q0 then decrement 'n'

2

1110

0110

1

0111

Step-2, Compare Q0Q-1 =11

So Only ASR A Q Q0 then decrement 'n'

2

1

1110

0101

0010

0110

0110

1011

1

1

0

0111

0111

0111

Step :3 As Q0Q-1 =01,

Then A <- A + M and ASR A Q Q-1, decrement count 'n

1

0

1011

1101

1011

1101

0

1

0111

0111

Step 4: Check Q0Q-1= 10

so A = A - M then ASR A,Q Q-1

then less the count by one


Related Solutions

Write a verilog code for 8-bit signed multiplication using Booth algorithm and represent the RTL view...
Write a verilog code for 8-bit signed multiplication using Booth algorithm and represent the RTL view for code
Using MARIE RTL, write RTL commands for CALL X and RET Instructions, assume there is an...
Using MARIE RTL, write RTL commands for CALL X and RET Instructions, assume there is an additional register called SP (Stack Pointer)
Let A be a 2×2 symmetric matrix. Show that if det A > 0 and trace(A)...
Let A be a 2×2 symmetric matrix. Show that if det A > 0 and trace(A) > 0 then A is positive definite. (trace of a matrix is sum of all diagonal entires.)
Trace the following code segment 1. use the red numbers under each statement to show the...
Trace the following code segment 1. use the red numbers under each statement to show the order that you execute the code by. For example: (1) means int p=3; (2) means p<10; (3) means p+=3; (1)(2)(3) means you execute int p=3 then p<10 then P+=3; (2)(1)(3) means you execute p<10 then int p =3 then P+=3; 2. show its output for (int p = 3 ; p <10; p += 3 )    (1) (2) (3)          {    for...
Trace the following code segment 1. use the red numbers under each statement to show the...
Trace the following code segment 1. use the red numbers under each statement to show the order that you execute the code by. For example: (1) means int p=3; (2) means p<10; (3) means p+=3; (1)(2)(3) means you execute int p=3 then p<10 then P+=3; (2)(1)(3) means you execute p<10 then int p =3 then P+=3; 2. show its output: int x = 30,  num = 100;     (1)    while ( x > 0) (2)           { cout   <<   endl                          <<  “ x...
Java programming Trace the algorithm for minimum spanning tree (eager, lazy Prim algorithm)
Java programming Trace the algorithm for minimum spanning tree (eager, lazy Prim algorithm)
Write RTL code to design a sequence generator which will generate the sequence : 0,0,1,0,1,1 and...
Write RTL code to design a sequence generator which will generate the sequence : 0,0,1,0,1,1 and repeat .  (FSM shouldn't be used in RTL) 
Develop a recursive algorithm to find the smallest and largest element in an array and trace...
Develop a recursive algorithm to find the smallest and largest element in an array and trace the recursive function with appropriate message. using c++ add comment to the code
Show that the cylinder x 2 + y 2 = 4 and the sphere x 2...
Show that the cylinder x 2 + y 2 = 4 and the sphere x 2 + y 2 + z 2 − 8y − 6z + 21 = 0 are tangent at the point (0, 2, 3). That is, show that the cylinder and sphere intersect at that point, and that they share the same tangent plane at that point.
in code c++ describe a recursive algorithm for multiplying two nonnegative integers x and y based...
in code c++ describe a recursive algorithm for multiplying two nonnegative integers x and y based on the fact that xy = 2(x · (y/2)) when y is even and xy = 2(x · ⌊y/2⌋) + x when y is odd, together with the initial condition xy = 0 when y = 0.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT