Question: MIPS please complete all #TODO methods sit sit t2 , St3, Sa0, $al, $zero $zero # set st2 to 1 if multiplicand Is less than


MIPS
please complete all #TODO methods
sit sit t2 , St3, Sa0, $al, $zero $zero # set st2 to 1 if multiplicand Is less than 0. # set St3 to 1 if multiplier is less than 0. # obtain the absolute value for ea ch of the numbers. # Start by obnt aining abs of the multiplicand. # TODO # TODO # Call subroutine, placing the result in $t4 for the abs of multiplicand # set St4 to the abs of the multiplicand. # Now obtain abs of multiplier. # TODO # TODO # TODO # Call subroutine, placing the result in st5 for the abs of multiplier. # set t5 to the abs of the multiplier . # Initialize the return register to 0. # TODO # TODO # Initialize t7, the shift count, to 0. multiplicationLoop: # Test the multiplier least significant bit to determine if it is set of not. #TODO # If the result is zero, do not add the value in. #TODO # TODO # Add the multiplicand to the product which is in svo. mutliplicationShifts: # TODO # shift the multiplicand one bit to the left. # TODO # Shift the Multipler one bit to the right. #increment the shift count by 1 #TODO # If we have looped less than 16 times, continue. Else we are done multiplying. blt $t7, 16, multiplicationLoop # Now that the multiplication is done, determine if sign needs to be changed. #TODO # TODO # exclusive or the bits that were captured up front. # If the XOR is a 0, do nothing, OTW negate the result. sit sit t2 , St3, Sa0, $al, $zero $zero # set st2 to 1 if multiplicand Is less than 0. # set St3 to 1 if multiplier is less than 0. # obtain the absolute value for ea ch of the numbers. # Start by obnt aining abs of the multiplicand. # TODO # TODO # Call subroutine, placing the result in $t4 for the abs of multiplicand # set St4 to the abs of the multiplicand. # Now obtain abs of multiplier. # TODO # TODO # TODO # Call subroutine, placing the result in st5 for the abs of multiplier. # set t5 to the abs of the multiplier . # Initialize the return register to 0. # TODO # TODO # Initialize t7, the shift count, to 0. multiplicationLoop: # Test the multiplier least significant bit to determine if it is set of not. #TODO # If the result is zero, do not add the value in. #TODO # TODO # Add the multiplicand to the product which is in svo. mutliplicationShifts: # TODO # shift the multiplicand one bit to the left. # TODO # Shift the Multipler one bit to the right. #increment the shift count by 1 #TODO # If we have looped less than 16 times, continue. Else we are done multiplying. blt $t7, 16, multiplicationLoop # Now that the multiplication is done, determine if sign needs to be changed. #TODO # TODO # exclusive or the bits that were captured up front. # If the XOR is a 0, do nothing, OTW negate the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
