Question 9Asked in UGC NET Computer Science, June 2017 (Paper II & III, Selected Questions)

Consider the following assembly language instructions : mov al, 15

Consider the following assembly language instructions : mov al, 15 mov ah, 15 xor al, al mov cl, 3 shr ax, cl add al, 90H adc ah, 0 What is the value in ax register after execution of above instructions?
  1. A0270H
  2. B01070H
  3. C01E0H
  4. D0370H
Show answerHide answer

Correct answer: (A) 0270H

Explanation

AX consists of AH and AL. mov al, 15 → AX = 000FH mov ah, 15 → AX = 0F0FH xor al, al → AX = 0F00H mov cl, 3 → AX = 0F00H, CL = 03 shr ax, cl → AX = 01E0H (shift right 3 times) add al, 90H → AX = 0170H, carry = 1 adc ah, 0 → AX = 0270H (adds the carry) So AX = 0270H.

From UGC NET Computer Science PYQ, June 2017 (Paper II & III, Selected Questions)

This is question 9 of UGC NET Computer Science PYQ, June 2017 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.