Multiplication of Two 8 bit Numbers using 8085 microprocessor

In this post, you will find the required algorithm, & 8085 program code To perform the Multiplication of two 8 bit numbers using the 8085 microprocessor. Also, you will get the observation and result.

Algorithm for Multiplication of Two 8 bit Numbers using 8085

1) Start the program by loading HL register pair with the address of memory location.
2) Move the data to a register (B register).
3) Get the second data and load it into Accumulator.
4) Add the two register contents.
5) Check for carry.
6) Increment the value of the carry.
7) Check whether repeated addition is over. And, store the value of the product and the carry in the memory location.
8) Terminate the program.

Program for Multiplication of Two 8 bit Numbers using 8085

MVI D, 00 //Initialize register D to 00
MVI A, 00 //Initialize Accumulator content to 00
LXI H, 4150
MOV B, M //Get the first number in B – reg
INX H
MOV C, M //Get the second number in C- reg.
LOOP: ADD B //Add content of A – reg to register B.
JNC NEXT //Jump on no carry to NEXT.
INR D //Increment content of register D
NEXT: DCR C //Decrement content of register C.
JNZ LOOP //Jump on no zero to address
STA 4152 //Store the result in Memory
MOV A, D
STA 4153 //Store the MSB of result in Memory
HLT //Terminate the program.

Program for Multiplication of Two 8 bit Numbers using 8085
Program for Multiplication of Two 8 bit Numbers using 8085

Observation

Input:

FF (4150)
FF (4151)

Output:

01 (4152)
FE (4153)

Result

Thus the 8085 microprocessor program to multiply two 8-bit numbers was executed.

Multiplication of Two 8 bit Numbers using 8085 microprocessor
Scroll to top
error: physicsTeacher.in