Can someone please give me a detailed explanation on how to solve this? 3. [10 p
ID: 3873445 • Letter: C
Question
Can someone please give me a detailed explanation on how to solve this?
3. [10 points] The table below shows the content of the N, Z, P condition code bits before and after execution of corresponding instructions in the following sequence of instructions. Instructions all belong to a single program and are not independent. They are executed in order; first inst# 1 then inst#2 and so on. What can you say about content of R2 before program was executed? NZP NZP (after) instruction 0101 010 0101 0001 010 010 000 001 001 100 010Explanation / Answer
As per instruction 2 the value of R2 changes from positive to negative on adding 2.
This means that R2 is a high positive integer such that on addition of 2 it changes to a negative value due to flipping of sign bit.