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

The contents of register (BL) and register (AL) of 8085 microprocessor are 49H and 3AH respectively. The contents of Al, the status of carry flag (CF) and…

The contents of register (BL) and register (AL) of 8085 microprocessor are 49H and 3AH respectively. The contents of Al, the status of carry flag (CF) and sign flag (SF) after executing 'SUB AL, BL' assembly language instruction, are
  1. AAL = 0FH; CF = 1; SF = 1
  2. BAL = F0H; CF = 0; SF = 0
  3. CAL = F1H; CF = 1; SF = 1
  4. DAL = 1FH; CF = 1; SF = 1
Show answerHide answer

Correct answer: (C) AL = F1H; CF = 1; SF = 1

Explanation

(AL) = 3AH = 00111010, (BL) = 49H = 01001001. AL – BL = 11110001, so (AL) = F1H, CF = 1, SF = 1. The carry (borrow) flag is set since the first operand is less than the second; the result is negative, so the sign flag is set.

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

This is question 10 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.