Home » Embedded Systems

Reverse an 8 bits number | 8085 Microprocessor

Here, we are going to learn how to reverse an 8 bits number in 8085 microprocessor?
Submitted by Akash Kumar, on October 29, 2018

Problem statement:

To reverse 8 bits number using 8085 microprocessors.

Algorithm:

  1. Load the accumulator with the first data.
  2. Use RLC instruction to shift contain of accumulator by 1 bit without carry. Use this 4 times to reverse the contain of accumulator.
  3. Now load the result value in memory location.

Program:

    LDA     2050   
    RLC
    RLC
    RLC
    RLC
    STA     3050
    HLT

Observation:

    INPUT: 
    2050:05

    OUTPUT: 
    3050:50

Hence, we successfully reversed 8 bits number.






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.