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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, gabesurlas
You should try to photograph people on bright sunny days because the light will be best a) true b) false
Answers: 1
image
Computers and Technology, 22.06.2019 10:30, JeroMii
Think about a recent customer service experience - either positive or negative. write a brief summary of that experience. now think about those four characteristics we look for in customer service representatives. how did the representative in your example stack up? write down your answer and give specific examples.
Answers: 1
image
Computers and Technology, 23.06.2019 00:30, haileesprague575
Quic which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
image
Computers and Technology, 23.06.2019 01:00, lusciousl
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan. in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan. out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
You know the right answer?
Consider the following mips loop: *(show work)

loop: slt $t2, $0, $t1

be...

Questions in other subjects:

Konu
Geography, 11.11.2020 22:30
Konu
Health, 11.11.2020 22:30