Question:medium

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: Feb 18, 2026
  • A, B, C, D
  • A, C, B, D
  • B, A, C, D
  • C, B, D, A
Show Solution

The Correct Option is B

Solution and Explanation

Step 1: Understand the task. The program calculates 0AH \(\times\) 0BH by iteratively adding 0AH to an accumulator 0BH (11 in decimal) times.

Register B stores the addend (0AH).
Register C acts as the loop counter (0BH).
Accumulator A stores the running sum, initialized to 0.

Step 2: Outline the program logic.

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

Step 3: Match the logic to the given instructions.

`ADD B` adds register B to the accumulator: A. ADD B.
`DCR C` decrements register C: C. DCR C.
`JNZ LOOP` jumps to LOOP if the zero flag is not set: B. JNZ LOOP.
`HLT END` halts the program: D. HLT END.
The correct instruction sequence within and after the loop is: `ADD B`, `DCR C`, `JNZ LOOP`, and `HLT END`, corresponding to A, C, B, D.
Was this answer helpful?
0


Questions Asked in CUET (PG) exam