Home » Embedded Systems

Subtraction of Two 8 bits number without borrow in 8085 Microprocessor

Here, we are going to learn how to find Subtraction of Two 8 bits number without borrow in 8085 Microprocessor?
Submitted by Akash Kumar, on October 19, 2018

Problem statement:

To perform subtraction of two 8 bits numbers without borrows using 8085 microprocessor.

Algorithm:

  1. Load the accumulator with the first data.
  2. Move data of accumulator to register B.
  3. Load the second data into accumulator.
  4. Subtract the content of register B with the content of accumulator.
  5. Now load the result value in memory location.

Program:

    LDA     2050   
    MOV     B,A
    LDA     2051    
    SUB     B         
    STA     2052

Observation:

    INPUT: 
    2050:02
    2051:04

    OUTPUT: 
    2052:02

Hence, we successfully subtracted two 8 bits numbers.






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.