The contents of Register (BL) and Register (AL) of 8085 microprocessor are 49H…
2017
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
- A.
AL = 0FH; CF = 1; SF = 1
- B.
AL = F0H; CF = 0; SF = 0
- C.
AL = F1H; CF = 1; SF = 1
- D.
AL = 1FH; CF = 1; SF = 1
Attempted by 36 students.
Show answer & explanation
Correct answer: C
Answer: AL = F1H; CF = 1; SF = 1
Step 1: Convert hex to decimal: AL = 3AH = 58 decimal; BL = 49H = 73 decimal.
Step 2: Subtract: 58 − 73 = −15 (a negative result, so a borrow occurred).
Step 3: Convert −15 to 8‑bit two's complement: 256 − 15 = 241 decimal = F1H. So AL = F1H.
Step 4: Carry flag (CF): Set to 1 because the subtraction required a borrow (result was negative).
Step 5: Sign flag (SF): Set to 1 because the result F1H has its most significant bit = 1 (negative in two's complement).