The contents of register (B) and accumulator (A) of an 8085 microprocessor are 3C H and 89 H respectively. The contents of A and the status of carry flag (CY) and sign flag (S) after executing SUB B instructions are 

This question was previously asked in
UPSC ESE (Prelims) Electronics and Telecommunication Engineering 19 Feb 2023 Official Paper
View all UPSC IES Papers >
  1. A = C5 H, CY = 1, S = 1
  2. A = 5C H, CY = 1, S =1
  3. A = C5 H, CY = 0, S = 1
  4. A = 5C H, CY = 0, S = 1

Answer (Detailed Solution Below)

Option 2 : A = 5C H, CY = 1, S =1
Free
ST 1: UPSC ESE (IES) Civil - Building Materials
6.2 K Users
20 Questions 40 Marks 24 Mins

Detailed Solution

Download Solution PDF

Given that,

Contents of register B = 3C H.

Contents of accumulator A = 89 H.

The subtraction A-B results in 89H - 3CH, which is equal to 4D H. The carry flag (CY) is set since there is no borrow. The sign flag (S) is set because the result is positive.

It indicates that the accumulator A will have the value 4D H, the carry flag (CY) will be 1, and the sign flag (S) will be S -1, which is effectively 1.

Here, option 2 is correct.

Latest UPSC IES Updates

Last updated on May 28, 2025

->  UPSC ESE admit card 2025 for the prelims exam has been released. 

-> The UPSC IES Prelims 2025 will be held on 8th June 2025.

-> The selection process includes a Prelims and a Mains Examination, followed by a Personality Test/Interview.

-> Candidates should attempt the UPSC IES mock tests to increase their efficiency. The UPSC IES previous year papers can be downloaded here.

More Programming with 8085 Questions

Get Free Access Now
Hot Links: teen patti neta teen patti gold teen patti wealth yono teen patti