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
The best way to dtermine this is by understanding that each registrer is arranged stiucturally
based on the needs. In this case, we can compute this as follows:
AR = AR + BR Add BR to AR storing answer in AR CR = CR ^ DR , BR = BR + 1 AND DR to
CR, INC BR AR = AR – CR Subtract CR from AR AR + BR = 11110010 + 11111111
(1)11110001 AR = 11110001 CR ^ DR = 10111001 ^ 11101010 10101000 CR = 10101000 BR
+ 1 = 00000000 BR = 00000000 AR – CR = 11110001 – 10101000 = 11110001 + ~(10101000)
+ 1 = 11110001 + 01010111 + 1 = 11110001 + 01010111 + 00000001 01001001 Therefore AR
= 01001001
Comments
Leave a comment