Question
Download Solution PDFThe 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
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFGiven 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.
Last updated on Jul 2, 2025
-> ESE Mains 2025 exam date has been released. As per the schedule, UPSC IES Mains exam 2025 will be conducted on August 10.
-> UPSC ESE result 2025 has been released. Candidates can download the ESE prelims result PDF from here.
-> 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.