Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Convert the high level language conditional instructions to MIPS assembly: if (i == j) f = g + h; else f = g - h;
Convert the high level language conditional instructions to MIPS assembly:
if (i == j)
f = g + h;
else
f = g - h;
Let:
$s3 contain the value of i
$s4 contain the value of j
$s1 contain the value of g
$s2 contain the value of h
A. | bne $s3, $s4, Exit
add $s0, $s1, $s2 j Exit Else: sub $s0, $s1, $s2 Exit: | |
B. | bne $s3, $s4, Else
add $s0, $s3, $s4 j Exit Else: sub $s0, $s3, $s4 Exit: | |
C. | bne $s3, $s4, Else
add $s0, $s1, $s2 Else: sub $s0, $s1, $s2
| |
D. | bne $s3, $s4, Else
add $s0, $s1, $s2 j Exit Else: sub $s0, $s1, $s2 Exit: |
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