Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Mips assembly code page 3 (a) Ada sso sso, sis (b) Addi sso, sets, .20 6. Repres

ID: 3796708 • Letter: M

Question


Mips assembly code page 3

(a) Ada sso sso, sis (b) Addi sso, sets, .20 6. Represem each of the fol owing instructiuni in binary Address instruction in Binary addi Bao, sao. -4 0x400000 12B [8spl 11 812 0x400010 11 Bubu svo, sao 360 7. Decode the following binary mmhems MIPs irstruetions and give the equivalent MIPs aseesbly language (MAL) statements 11101 001000 101011 0x10001A04 0x10001 100011 0x10001A10 0000U 000000 0x10001A18 8. Assume tarra' isa len element array of integets whose address is stored in Sto. Also assume variable Kis Sul and y is S12. For each part, pick the MIPs asemt code which has the same bly functionality as the given C code. x-array 13 12 Isto 12 (Sto 12

Explanation / Answer

6.

addi $a0,$a0,-4
0010 0000 1000 0100 1111 1111 1111 1100

lw $s2,128($sp)
1000 1111 1011 0010 0000 0000 1000 0000

sll $t2,$t3,5
0000 0000 0000 1011 0101 0001 0100 0000

subu $v0,$a0,$s0
0000 00ss ssst tttt dddd d000 0010 0011

7.

001000 11101 11101 11111 11111 111100
addi $sp,$sp,-4

101011 11101 11111 00000 00000 000000
sw $ra,0($sp)

000000 00000 00101 00101 00000 000000
add $a1,$zero,$a1