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

the answer that I get is 11 but I not sure about it, so I would like to know is

ID: 3803328 • Letter: T

Question

the answer that I get is 11 but I not sure about it, so I would like to know is my answer is correct

mov n, 1

mov t, 2

while: cmp n, 7

jge end       

mov eax, t                                                                                                                                                              

add eax, n

mov t, eax

mov eax, n

add eax, 2

mov n, eax

jmp while

mov eax, t

add eax, 1

mov t, eax

end:

Assume the above partial program was run. When completed the final value of t is    (decimal)

Explanation / Answer

Yes. Your answer is correct. It should be 11 only as when n becomes 7 then it will execute conditional jump to end line. So, below 3 lines will never execute.

mov eax, t

add eax, 1

mov t, eax