The Gateway to Computer Science Excellence

+9 votes

Best answer

**My Answer:** None of These, **ISRO Answer:** (a)

**Explanation:** 8085 microprocessor has a 8 bit flag register to indicate certain conditions arising after arithmetic and logical operations or to control certain operations.

- Carry flag indicates whether there is carry or not after an arithmetic and logical operation.
- Parity flag indicates whether the result contains odd number of 1s or even number of 1s.
- Auxiliary carry (or half carry) flag indicates that is there carry from the 3rd bit to 4th.
- Zero flag indicates whether the result of an arithmetic or logical operation is zero or nonzero.
- Sign flag indicates whether the result is positive or negative.
- Other bits in this register are undefined.

Lets traverse the program:

- SUB A: subtracts the content of accumulator (A) from the content of the accumulator (A); Content of A will become (00)H; Flag Register: 0100 0100 because result is zero and result contains 0 (even) number of 1s.
- MVI B, (01)H : stores 01 in register B; No computation, no change in Flag Register.
- DCR B: decreases content of register B; Content of B will become (00)H; Flag Register: 0100 0100 because result is zero and result contains 0 (even) number of 1s and DCR/INC don't affect the carry flag in 8085.

So, flag register after execution will be 0100 0100 = (44)H.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,297 answers

198,262 comments

104,977 users