Consider the following arithmetic operations: int A=5; int B= 6; int C=A+B Which of following codes is the correct and equivalent MIPS code of the above arithmetic operations? a) mov ebx,B add eax,ebx...


Consider the following arithmetic operations:<br>int A=5;<br>int B= 6;<br>int C=A+B<br>Which of following codes is the correct and equivalent MIPS code of the above arithmetic<br>operations?<br>a)<br>mov ebx,B<br>add eax,ebx<br>b) move $t1,A<br>move $t2,B<br>add $t0,$t1,$t2<br>mov eax,A<br>mov C,eax<br>move C,$t0<br>c)<br>lw $s1,A<br>lw $s2,B<br>add $s0,$s1,$s2<br>sw $s0,C<br>d) la $t0,A<br>la $t1,B<br>la $t2,C<br>lw $s1,($t0)<br>lw $s2,($t1)<br>add $s0,$s1,$s2<br>sw $s0,C<br>

Extracted text: Consider the following arithmetic operations: int A=5; int B= 6; int C=A+B Which of following codes is the correct and equivalent MIPS code of the above arithmetic operations? a) mov ebx,B add eax,ebx b) move $t1,A move $t2,B add $t0,$t1,$t2 mov eax,A mov C,eax move C,$t0 c) lw $s1,A lw $s2,B add $s0,$s1,$s2 sw $s0,C d) la $t0,A la $t1,B la $t2,C lw $s1,($t0) lw $s2,($t1) add $s0,$s1,$s2 sw $s0,C

Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here