Home »
Embedded Systems
Convert 8-bit ASCII to BCD number | 8086 Microprocessor
In this tutorial, we will learn how to convert 8-bit ASCII to BCD number using 8086 Microprocessor?
By Akash Kumar Last updated : May 22, 2023
Problem Statement
To convert ASCII to BCD 8-bit number using 8086 Microprocessor.
Algorithm
- Load the value from memory into register AL
- Then perform and operation on register AL with 0F
- Move the result value from register AL to memory
- Terminate the program
Program
MOV AL, [0600]
AND AL, 0F
MOV [0601], AL
HLT
Observation
INPUT:
0600:35
OUTPUT:
0601:05
Hence we successfully converted 8 bit ASCII number to its equivalent BCD using 8086 Microprocessor.