×

Embedded Systems Tutorial

AVR Microcontroller

8051 Microcontroller

8085 Microprocessor

8086 Microprocessor

8255 Microprocessor

Embedded Systems Practice

Subtract Two 8-bit Numbers without Borrow in 8085 Microprocessor

In this tutorial, we will learn how to subtract two 8-bit numbers without borrow in 8085 Microprocessor? By Akash Kumar Last updated : May 13, 2023

Subtraction of Two 8-bit numbers without Consideration of Borrow in 8085 Microprocessor

Given two 8-bit numbers, we have to subtract them without borrow in 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!

Load comments ↻





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