GATE Exam  >  GATE Questions  >  For 8085 microprocessor, the following progra... Start Learning for Free
For 8085 microprocessor, the following program is executed
MVI A, 05H;
MVIB, 05H;
PTR: ADD B;
DCR B;
JNZ PTR;
ADI 03H;
HLT;
At the end of program, accumulator contains
  • a)
    17 H
  • b)
    20 H
  • c)
    23 H
  • d)
    05 H
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
For 8085 microprocessor, the following program is executedMVI A, 05H;M...
Accumulator changes as follows (05 + 05 + 04 +03 +02 +01)H
At the end of Loop accumulator contains = 14H
ADI O3H →A=(14+03)=17H
View all questions of this test
Most Upvoted Answer
For 8085 microprocessor, the following program is executedMVI A, 05H;M...
Explanation:

The program executes the following steps:

1. Load the accumulator with the value 05H
2. Load the register B with the value 05H
3. Add the value in register B to the accumulator
4. Decrement the value in register B
5. If the value in register B is not zero, jump to step 3
6. Add the value 03H to the accumulator
7. Halt the program

The program executes a loop where the value in register B is added to the accumulator and then decremented until the value in register B becomes zero.

After the loop, the value 03H is added to the accumulator, resulting in the value 08H in the accumulator.

Therefore, the correct answer is option 'A', which is 17H in hexadecimal.
Explore Courses for GATE exam
For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer?
Question Description
For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer?.
Solutions for For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice For 8085 microprocessor, the following program is executedMVI A, 05H;MVIB, 05H;PTR: ADD B;DCR B;JNZ PTR;ADI 03H;HLT;At the end of program, accumulator containsa)17 Hb)20 Hc)23 Hd)05 HCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev