Question: Create multiplication function in MIPS ASSEMBLY no psuedo code!!!! $a0 first integer $a1 second integer $v0 first integer * second integer This function is to

Create multiplication function in MIPS ASSEMBLY no psuedo code!!!!

$a0 first integer

$a1 second integer

$v0 first integer * second integer

This function is to calculate and return the result of multiplying the arguments together. Your solution must implement the multiplication algorithm used in the picture below. Assume that the parameter values can be stored in 16 bits so the product will fit into one 32 bit register. You must handle both positive and negative numbers plus zero.

Using a version of the mult instruction is NOT ACCEPTABLE. NO MULT!

Create multiplication function in MIPS ASSEMBLY no psuedo code!!!! $a0 first integer

Start Multipliero 31 Multipliero- 0 1. Test Multiplier 1a. Add multiplicand to product and place the result in Product register 2. Shift the Multiplicand register left 1 bit 3. Shift the Multiplier register right 1 bit No: 32 repetitions 32nd repetition? Yes: 32 repetitions Done FIGURE 3.4 The first multiplication algorithm, using the hardware shown in Figure 3.3. If the least significant bit of the multiplier is 1, add the multiplicand to the product. If not, go to the next step. Shift the multiplicand left and the multiplier right in the next two steps. These three steps are repeated 32 times

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!