Answered step by step
Verified Expert Solution
Question
1 Approved Answer
main: # Case 1: positive x positive = positive: addi $s2, $zero,2 # $s2 = 0 + 2 = 2 addi $s3, $zero,3 # $s3
main: # Case 1: positive x positive = positive: addi $s2, $zero,2 # $s2 = 0 + 2 = 2 addi $s3, $zero,3 # $s3 = 0 + 3 = 3 mult $s2, $s3 # (2 points) verify with MARS: Hi = Ox ; Lo = Ox # Case 2: positive x negative = negative: addi $s2, $zero, 2 # $s2 = 2 addi $s3, $zero,-3 # $s3 = -3 (=fffffffd) (2's complement) mult $s2, $s3 # (2 points) verify with MARS: Hi = 0x ; Lo = Ox # Case 3: negative x negative = positive: addi $s2, $zero,-2 #$s2 = -2 (= ffff fffe) (2's complement) addi $s3, $zero,-3 # $s3 = -3 (=ffff fffd) (2's complement) mult $s2, $s3 # (2 points) verify with MARS: Hi = Ox ; Lo = Ox wait: j wait # wait
Step 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