Home »
Embedded Systems
Add Three 16-bit Numbers in 8085 Microprocessor
In this tutorial, we will learn how to find the addition of three 16-bit numbers in 8085 Microprocessor.
By Akash Kumar Last updated : May 13, 2023
Addition of Three 16-bit Numbers in 8085 Microprocessor
To perform addition operation on three 16-bit numbers that is stored on registers using 8085 Microprocessor.
Assumption
- Numbers are already stored on registers.
- While choosing the numbers we have to keep in mind that the sum of these numbers should not be greater than FFFF.
Algorithm
- Add the content stored at HL pair register with the content of DE pair register and result will be stored at HL pair register.
- Now move the content of register B to register D and content of register C to register E.
- Now perform the step 1 again.
- The result will be stored at HL pair register.
Program
DAD D
MOV E, C
MOV D, B
DAD D
HLT
Observation
INPUT:
B:04
C:02
D:02
E:02
H:03
L:04
OUTPUT:
H:09
L:08
Hence, we successfully added three 16-bit numbers that are stored on registers.