Home » Embedded Systems

Division of two 8 bits numbers using 8085 Microprocessor

Here, we are going to learn how to find Division of two 8 bits numbers using 8085 Microprocessor?
Submitted by Akash Kumar, on October 21, 2018

Problem statement:

To perform division operation between two 8 bits numbers using 8085 Microprocessor.

Algorithm:

  1. Load the HL pair registers with address of memory location.
  2. Move the first data to register B.
  3. Move the second data to the accumulator.
  4. Then compare two numbers for carry.
  5. Subtract the content of Register B to the content of accumulator.
  6. Then increment the value of carry.
  7. Then check whether the repeated subtraction is over.
  8. If the repeated subtraction is over then store the value of quotient and remainder in the given memory location.

Program:

    LXI     H, 3050
    MOV     B, M
    MVI     D, 00
    INX     H
    MOV     A, M
    *** CMP B
    JC **
    SUB     B
    INR     C
    JMP ***
    ** STA 3052
    MOV     A, C
    STA     3053
    HLT

Observation:

    INPUT: 
    3050:04
    3051:02

    OUTPUT: 
    3052:02
    3053:00

Hence we successfully divided 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.