The 8-bit registers AR, BR, CR, and DR initially have the following values: AR= 11010010, BR= 11100011, CR= 10111001 , DR= 10101011 Determine the 8-bit values in each register after the execution of the following sequence of microoperations. AR <-AR + BR CR <- CR ^ DR, BR <- CR + 1 AR <-AR – CR
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