Question:

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 the instruction SUB AL, BL are:

Show Hint

In 8085 subtraction, check for negative results by evaluating the carry (borrow) and sign (MSB) flags.
Updated On: Dec 29, 2024
  • AL = F1H; CF = 1; SF = 1
  • AL = 0FH; CF = 1; SF = 1
  • AL = F0H; CF = 0; SF = 0
  • AL = 1FH; CF = 1; SF = 1
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

The instruction SUB AL, BL performs the operation AL = AL − BL. In this case: AL = 3AH, BL = 49H. Performing the subtraction: 3AH − 49H = −0F H. In hexadecimal, negative results are represented in two’s complement form: −0F H = F1H. Carry Flag (CF): Since the result of the subtraction is negative, a borrow occurs, setting CF = 1. Sign Flag (SF): The most significant bit (MSB) of the result is 1, indicating a negative number, so SF = 1.
Was this answer helpful?
0
0

Questions Asked in CUET PG exam

View More Questions