MIPS Project 4 –Booth’s algorithm Solved

30.00 $

Category:

Description

5/5 - (1 vote)

In this project, you are required to perform a complete run of Booth’s algorithm on two

16-bit signed numbers. The generation steps for the two numbers are described as follows.

  • Assume that the numerical part of your student ID is A.
  • The square of A is B (B = A2). Use binary representation to represent B.
  • Right shift B for 16 bits, take the lower 15 bits, and append an extra bit ‘0’ to the most significant bit (MSB) to form a new 16-bit number C. (i.e., C is a positive number.)
  • Right shift B for 16 bits, take the lower 15 bits, and append an extra bit ‘1’ to the most significant bit (MSB) to form a new 16-bit number D. (i.e., D is a negative number.)
  • Perform C×D by using the Booth’s algorithm.

 

Please submit your Booth’s multiplication result according to the following rules:

  • You are required to write every detailed step according to our lecture notes.
  • Upload your homework in TEXT format.
  • The filename is your student ID (e.g., B12345678.txt).

 

Example:

 

  • = 12345678
  • = 100010101001111100001111100011000011001111000100
  • = 0000111110001100
  • = 1000111110001100

CD

 

Step               Product                  Next

  • 0000000000000000 1000111110001100 0 00 -> shift
  • 0000000000000000 0100011111000110 0 00 -> shift
  • 0000000000000000 0010001111100011 0 10 -> sub
  • +1111000001110100

1111000001110100 0010001111100011 0

1111100000111010 0001000111110001 1   11 -> shift

  • 0000001111000110 1101001001000010 0 00 -> shift
  • 0000000111100011 0110100100100001 0 10 -> sub
  • +1111000001110100

1111001001010111 0110100100100001 0

1111100100101011 1011010010010000 1   done

CD = 1111100100101011 1011010010010000

 

  • project4-kmta1i.zip