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

Name o. (11 pts) Function (9 pts) Examine the following MIPS function gaxply. So

ID: 3731264 • Letter: N

Question

Name o. (11 pts) Function (9 pts) Examine the following MIPS function gaxply. Some of the instructio function calling conventions have been omitted. Fill in the instructions so that garply can be used correctly. Then assemble the 6 instructions that were given in binary MIPS machine code. Give your answers in binary, and then that the base address of the function garply is at 0x10000000. You may use some kind of obvious shorthand to denote long strings of ones or zeros, e.g 16(1) to denote 16 ones in 1. s related o the problem into hexadecimal. Assume a row. See examples below. Machine Code MIPS assembly Hexadecimal Binary garply: 0x20020000 001000 00000 00010 1610) lbu Sto 0 ($a0) beq Sto szero end 1 garply 001000 00010 00010 (15(0) 1 0x20420001 end:

Explanation / Answer

addiu $v0, $zero, 0 001000 00000 00010 16{0} 0x20020000 lbu $t0, 0($a0) 100100 00100 01000 16{0} 0x90880000 beq $t0, $zero, end 000100 01000 00000 0001 12{0} 0x11001000 addiu $a0, $a0, 1 001001 00100 00100 (15{0}) 1 0x24840001 jal garply 000011 0001 22{0} 0x0C400000 addiu $v0, $v0, 1 001001 00010 00010 (15{0}) 1 0x24420001