Home »
Embedded Systems
Addition of two 16 bits numbers in 8085 Microprocessor using 16 bits operation
Here, we are going to learn how to add two numbers of two 16 bits numbers in 8085 microprocessor using 16 bits operations?
Submitted by Akash Kumar, on October 30, 2018
Problem statement:
To add two 16 bits numbers in 8085 Microprocessor using 16 bits operation.
Algorithm:
- Load both the lower bit and higher bit of first number at once.
- Copy the content HL pair to DE pair register.
- Now the load the lower and higher bit of second number in HL pair register.
- ADD both the register pair content using DAD operation.
- Now move the result at memory location.
Program:
LHLD 2050
XCHG
LHLD 2052
DAD D
SHLD 2054
HLT
Observation:
INPUT:
2050:11
2051:11
2052:22
2053:22
OUTPUT:
2054:33
2055:33
Hence, we successfully added two 16 bits numbers using 16 bits operation.