subject

Consider the following mips loop: *(show work)

loop: slt $t2, $0, $t1

beq $t2, $0, done

subi $t1, $t1, 1

addi $s2, $s2, 2

j loop

done:

a) assume that the register $t1 is initialized to the value 10. what is the value in register $s2 assuming $s2 is initially zero?

b) for each of the loops above, write the equivalent c code routine. assume that the registers $s1, $s2, $t1, and $t2 are integers a, b, i, and temp, respectively.

c) for the loops written in mip assembly above, assume that the register $t1 is initialized to the value n. how many mips instructions are executed?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:00
Which database model is best used for data warehouse and data mining
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
You know the right answer?
Consider the following mips loop: *(show work)

loop: slt $t2, $0, $t1

be...
Questions