UGC NET CS 2017Computer System Architecture › Programming the Basic ComputerVerified
UGC NET CS 2017 PYQ: Consider the following assembly program fragment: stc mov al, 11010110b mov cl,2 rcl al,3 rol al, 4 shr al,…
Consider the following assembly program fragment:
stc
mov al, 11010110b
mov cl,2
rcl al,3
rol al, 4
shr al, cl
mul cl The contents of the destination register $ax$ (in hexadecimal ) and the status of Carry Flag (CF) after the execution of above instructions, are:
- A$ax =003CH; \: CF=0$Correct answer
- B$ax=001EH; \: CF=0$
- C$ax=007BH; \: CF=1$
- D$ax=00B7H; \: CF=1$
Answer
(A) $ax =003CH; \: CF=0$
Approach
Trace the 8086 instructions step by step on AL and the flags.
Reviewed by UGC IQ Editorial Team.