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!
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 timesStep 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