Home » Embedded Systems

Addition of three 16 bits numbers | 8085 Microprocessor

Here, we are going to learn how to find addition of three 16 bits numbers on 8085 microprocessor?
Submitted by Akash Kumar, on November 05, 2018

Problem statement:

To perform addition operation between 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 bits numbers that are stored on registers.






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.