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

  1. Numbers are already stored on registers.
  2. While choosing the numbers we have to keep in mind that the sum of these numbers should not be greater than FFFF.

Algorithm

  1. Add the content stored at HL pair register with the content of DE pair register and result will be stored at HL pair register.
  2. Now move the content of register B to register D and content of register C to register E.
  3. Now perform the step 1 again.
  4. 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.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.