Question:

It is desired to multiply the numbers 0AH by 0BH and store the result in the accumulator. The numbers are available in registers B and C, respectively. A part of the 8085 program for this purpose is given below: MVI A, 00H; Loop:---; ---; ---; ---. The sequence of remaining 4 instructions to complete the program would be

Show Hint

Multiplication in early microprocessors is often implemented with a simple "add and loop" algorithm. One register holds the multiplicand, another holds the multiplier (as a counter), and the accumulator sums the result.
Updated On: Sep 19, 2025
  • A, B, C, D
  • A, C, B, D
  • B, A, C, D
  • C, B, D, A
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understand the task. The program needs to compute 0AH \(\times\) 0BH. This can be done by adding 0AH to an accumulator 0BH (11 decimal) times.

Register B holds the number to be added (0AH).
Register C holds the loop count (0BH).
The accumulator (A) will store the sum, starting from 0.

Step 2: Outline the program logic.

Initialize the accumulator to 0. (Given: `MVI A, 00H`)
Start a loop.
Add the contents of register B to the accumulator. (Instruction: `ADD B`)
Decrement the loop counter in register C. (Instruction: `DCR C`)
Check if the counter (C) has reached zero. If not, repeat the loop. (Instruction: `JNZ LOOP`)
If the counter is zero, halt the program. (Instruction: `HLT END`)

Step 3: Match the logic to the given instructions.

The instruction to add B is A. ADD B.
The instruction to decrement C is C. DCR C.
The instruction to jump if not zero is B. JNZ LOOP.
The instruction to halt is D. HLT END.
The correct sequence inside and after the loop is: `ADD B`, then `DCR C`, then `JNZ LOOP`, and finally `HLT END`. This corresponds to the sequence A, C, B, D.
Was this answer helpful?
0
0

Questions Asked in CUET PG exam

View More Questions