Question: I need help with this Question 3 Let U be the following URM program: 0: if Ro-0 then goto 4 1: Ro:= Ro-1 3 RiRi
I need help with this

Question 3 Let U be the following URM program: 0: if Ro-0 then goto 4 1: Ro:= Ro-1 3 RiRi 1 4: if R2 = 0 then goto 0 5: if Ri0 then goto 10 7: Ro Ro 1 8 RoRo +1 9: if R2 0 then goto 5 Describe how this program is executed if run with register Ro initially set to a natural number n, R1 set to a natural number m, and all other registers set to 0. What is the function f N2N computed by this program? Justify your answer. [18 marks Question 3 Let U be the following URM program: 0: if Ro-0 then goto 4 1: Ro:= Ro-1 3 RiRi 1 4: if R2 = 0 then goto 0 5: if Ri0 then goto 10 7: Ro Ro 1 8 RoRo +1 9: if R2 0 then goto 5 Describe how this program is executed if run with register Ro initially set to a natural number n, R1 set to a natural number m, and all other registers set to 0. What is the function f N2N computed by this program? Justify your answer. [18 marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
