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

4 multiple choice questions Problem1: Select the best answer: 1) The MIPS code b

ID: 3551365 • Letter: 4

Question


4 multiple choice questions

Problem1: Select the best answer:

1) The MIPS code below realizes which of the following operations:


addi $sp,$sp,-4

sw $t0,0($sp)

a) Pops $sp from Top of Stack

b) Pops $sp from Bottom of stack

c) Pushes $t0 on the stack

d) Pushes $t0 to the Program Counter

e) Loads the stack pointer with $t0

2) Which of the following MIPS instructions will modify the contents of the $ra register:

a) j label

b) jal label

c) jr $ra

d) bne $t0,$t1,label

e) choices b) and c) above

3) Given a MIPS program with the instructions below which resides starting at memory byte address 8ten:

label: addi $t0,$t0,-1

bne $t0,$t1,exit

j label

exit:

For this program, what is the machine code representation of: bne $t0,$t1,exit

a) 0x14FFFFFF

b) 0x15080000

c) 0x15090000

d) 0x15090001

e) 0x1509FFFE

4) Given a MIPS program with the instructions below which resides starting at memory byte address 8ten:

label: addi $t0,$t0,-1

bne $t0,$t1,exit

j label

exit:

For this program, what is the machine code representation of: j label

a) 0x08000002

b) 0x08000008

c) 0x08000040

d) 0x08100000

e) 0x40000040

Explanation / Answer

1> c) Pushes $t0 on the stack

2> c) jr $ra

3> b) 0x15080000

4> d) 0x08100000

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote