×

Embedded Systems Tutorial

AVR Microcontroller

8051 Microcontroller

8085 Microprocessor

8086 Microprocessor

8255 Microprocessor

Embedded Systems Practice

Reverse an 8-bit Number in 8085 Microprocessor

In this tutorial, we will learn how to reverse an 8-bit number in 8085 Microprocessor? By Akash Kumar Last updated : May 13, 2023

Reverse an 8-bit Number in 8085 Microprocessor

Given an 8-bit number, we have to reverse the given number in 8085 Microprocessor.

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!

Load comments ↻





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