Home »
Embedded Systems
Subtraction of Two 16-bit Numbers without Carry | 8086
In this tutorial, we will learn how to find the subtraction of two 16-bit numbers without carry in 8086 Microprocessor?
By Akash Kumar Last updated : May 22, 2023
Problem Statement
To perform subtraction operation between 2 16bit numbers without carry using 8086 Microprocessor.
Algorithm
- Load the first data into register AX from memory.
- Load the second data into register BX from memory.
- Subtract content of register BX with the content of register AX.
- Now load the result value from AX to memory.
8086 program to subtract two 16-bit numbers without carry
MOV AX, 2050
MOV BX, 2052
SUB AX, BX
MOV 2054, AX
HLT
Observation
INPUT:
2050:03
2051:03
2052:03
2053:03
OUTPUT:
2052:00
2053:00
Hence we successfully subtracted two 16-bit numbers without using carry.