The 8-bit registers R1, R2, R3, and R4 initially have the following values:
R1 - 1111 0010, R2- 1 1 1 1 1 1 1 1 , R3- 1011 1001 , R4 1 1 101010
Determine the 8-bit values in each register after the execution of the following sequence of
microoperations.
R1 <-R1 + R2
R3<- R3 ^ R4, R2 <- R2 + 1
R1 <- R1 – R3
R1 = R1 + R2 Add R2 to R1 storing answer in R1 R3 = R3 ^ R4 , R2 = R2 + 1 AND
R4 to R3, INC R2
R1 = R1 – R3 Subtract R3 from R1
R1 + R2 =
11110010 + 11111111 (1)11110001 R1 = 11110001 R3 ^ R4 = 10111001 ^
11101010
10101000 R3 = 10101000 R2 + 1 = 00000000 R2 = 00000000 R1 – R3 =
11110001 –
10101000 = 11110001 + ~(10101000) + 1 = 11110001 + 01010111 + 1 =
11110001 +
01010111 + 00000001 01001001
Therefore R1 = 01001001
Comments
Leave a comment