HSC Science (Computer Science) 12th Board ExamMaharashtra State Board
Share
Notifications

View all notifications

Accumulator contents of 8085 are B7H and register B contents are A5H.What will be the effect of following instructions on the. contents of  Accumulator, when executed independently ? - HSC Science (Computer Science) 12th Board Exam - Computer Science 2

Login
Create free account


      Forgot password?

Question

Accumulator contents of 8085 are B7H and register B contents are A5H.What will be the effect of following instructions on the. contents of  Accumulator, when executed independently ?
(i) ADI 05
(ii) CMP B
(iii) CMA
(iv) XRA B
(v) ORA B

Solution

The accumulator value is B7H and B register value is A5H
(i) ADI 05
Add immediately with 05H
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Instruction - ADI 05
After execution [A] = 1 0 1 1 1 1 0 0 [1 Mark]
(ii) CMP B
Compare B with accumulator
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Before execution [B] = A5H = 1 0 1 0 0 1 0 1
Instruction - CMP B
Condition:
(a) If [A] < [B] then Carry flag is set.
(b) If [A] = [B] then Zero flag is set.
(c) If [A] > [B] then both Carry and Zero flags are reset. [1 Mark]
(iii) CMA
Complement the accumulator
Befor execution [A] = B7H = 1 0 1 1 0 1 1 1
Instruction - CMA
After execution : 48H = 0 1 0 0 1 0 0 0 [1 Mark]
(iv) XRA B
Exclusive OR with accumulator
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Before execution [B] = A5H = 1 0 1 0 0 1 0 1
After execution : 12H = 0 0 0 1 0 0 1 0

(v) ORA B
Logical OR with B
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Before execution [B] = A5H = 1 0 1 0 0 1 0 1
After execution : B7H = 1 0 1 1 0 1 1 1

  Is there an error in this question or solution?

APPEARS IN

 2015-2016 (March) (with solutions)
Question 5.2.2 | 5.00 marks
Solution Accumulator contents of 8085 are B7H and register B contents are A5H.What will be the effect of following instructions on the. contents of  Accumulator, when executed independently ? Concept: Instruction Set and Programming of 8085.
S
View in app×