Microprocessor 8085 Programming · Microprocessors and Computer Organization
7 questions · asked in 6 of 26 years (2001–2026)
MCQ 71-mark 6 · 2-mark 1
2001Questions per year2026
Questions 1–5 of 7
The following FIVE instructions were executed on an 8085 microprocessor.
MVI A, 33H
MVI B, 78H
ADD B
CMA
ANI 32H
The Accumulator value immediately after the execution of the fifth instruction is
MVI A, 33H
MVI B, 78H
ADD B
CMA
ANI 32H
The Accumulator value immediately after the execution of the fifth instruction is
Answer: (B)
Follow the accumulator (A) step by step:
MVI A, 33H: A = 33H
MVI B, 78H: B = 78H
ADD B: , so A = ABH = 1010 1011
CMA: complements every bit of A, so A = 0101 0100 = 54H
ANI 32H: AND A with 32H = 0011 0010:
So A = 10H.
Answer: (B)
MVI A, 33H: A = 33H
MVI B, 78H: B = 78H
ADD B: , so A = ABH = 1010 1011
CMA: complements every bit of A, so A = 0101 0100 = 54H
ANI 32H: AND A with 32H = 0011 0010:
So A = 10H.
Answer: (B)
Which one of the following 8085 microprocessor programs correctly calculates the product of two 8-bit numbers stored in registers B and C?
Answer: (C)
We can get a product by adding the same number again and again.
Only option (C) does the addition in a repeated way.
Here register B works as the counter. Register C is added to the accumulator, which starts at 00H. So C is added to the accumulator B times.
Only option (C) does the addition in a repeated way.
Here register B works as the counter. Register C is added to the accumulator, which starts at 00H. So C is added to the accumulator B times.
For 8085 microprocessor, the following program is executed.
MVI A, 05H;
MVI B, 05H;
PTR: ADD B;
DCR B;
JNZ PTR;
ADI 03H;
HLT;
At the end of program, accumulator contains
MVI A, 05H;
MVI B, 05H;
PTR: ADD B;
DCR B;
JNZ PTR;
ADI 03H;
HLT;
At the end of program, accumulator contains
Answer: (A)
ADD B adds B to A, DCR B reduces B by 1, and JNZ PTR repeats the loop until B becomes 0 (zero flag set).
Values in decimal, A after each ADD B:
Then ADI 03H adds 3:
Here 23 is a decimal number, so it must be converted to hex. 23H is the same digits read as hex, and is not the answer.
Answer: (A)
Values in decimal, A after each ADD B:
Then ADI 03H adds 3:
Here 23 is a decimal number, so it must be converted to hex. 23H is the same digits read as hex, and is not the answer.
Answer: (A)
An 8085 assembly language program is given below.
Line 1: MVI A, B5H
2: MVI B, 0EH
3: XRI 69H
4: ADD B
5: ANI 9BH
6: CPI 9FH
7: STA 3010H
8: HLT
After execution of line 7 of the program, the status of the CY and Z flags will be
Line 1: MVI A, B5H
2: MVI B, 0EH
3: XRI 69H
4: ADD B
5: ANI 9BH
6: CPI 9FH
7: STA 3010H
8: HLT
After execution of line 7 of the program, the status of the CY and Z flags will be
Answer: (C)
Trace of the accumulator A (hex):
CPI compares by subtracting. Here , so a borrow occurs and CY = 1. The difference is not zero, so Z = 0.
Line 7, STA, does not change any flag, so after line 7: CY = 1, Z = 0.
Answer: (C)
CPI compares by subtracting. Here , so a borrow occurs and CY = 1. The difference is not zero, so Z = 0.
Line 7, STA, does not change any flag, so after line 7: CY = 1, Z = 0.
Answer: (C)
An 8085 assembly language program is given below.
Line 1: MVI A, B5H
2: MVI B, 0EH
3: XRI 69H
4: ADD B
5: ANI 9BH
6: CPI 9FH
7: STA 3010H
8: HLT
The contents of the accumulator just execution of the ADD instruction in line 4 will be
Line 1: MVI A, B5H
2: MVI B, 0EH
3: XRI 69H
4: ADD B
5: ANI 9BH
6: CPI 9FH
7: STA 3010H
8: HLT
The contents of the accumulator just execution of the ADD instruction in line 4 will be
Answer: (B)
Follow the accumulator (A) until line 4:
Line 1: A = B5H = 1011 0101
Line 2: B = 0EH = 0000 1110 (this loads B, A is unchanged)
Line 3, XRI 69H: A = A XOR 69H
, so A = DCH
Line 4, ADD B: A = A + B = DCH + 0EH = EAH
Check: = EAH.
Answer: (B)
Line 1: A = B5H = 1011 0101
Line 2: B = 0EH = 0000 1110 (this loads B, A is unchanged)
Line 3, XRI 69H: A = A XOR 69H
, so A = DCH
Line 4, ADD B: A = A + B = DCH + 0EH = EAH
Check: = EAH.
Answer: (B)
Keep practising
Topics in Microprocessors and Computer Organization
Basics of 8085 MicroprocessorInstructions of 8085 Microprocessor
Microprocessor 8085 ProgrammingYou are here
Microprocessor 8085 InterruptsInterfacing and Peripheral Devices