Question: # EX 1 4 - mult - SP 2 0 2 1 # Objective: experiment with: # multiply: mult # Description: # mult $s 2
# EXmultSP
# Objective: experiment with:
# multiply: mult
# Description:
# mult $s $s
# When $Sbit x $Sbit the result is bits
# MIPS processor places:
# the most significant bits in Register: Hi
# the least significant bits in Register: Lo
main:
# Case : positive x positive positive:
addi $s $zero, # $s
addi $s $zero, # $s
mult $s $s # points verify with MARS: Hi x ; Lo x
# Case : positive x negative negative:
addi $s $zero, # $s
addi $s $zero, # $s ffff fffds complement
mult $s $s # points verify with MARS: Hi x FFFFFFFF ; Lo xFFFFFFFA
# Case : negative x negative positive:
addi $s $zero, # $s ffff fffes complement
addi $s $zero, # $s ffff fffds complement
mult $s $s # points verify with MARS: Hi x ; Lo x
wait: j wait # wait
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
