
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Convert 8-bit BCD Number to Hexadecimal in 8086
In this program we will see how to find the equivalent hexadecimal number from a BCD number.
Problem Statement
Write 8086 Assembly language program to find the equivalent hexadecimal number from a BCD number. The number is stored at memory offset 500 and store the result at memory offset 600.
Discussion
To convert BCD to hexadecimal at first we have to cut the BCD digits. The most significant digit will be multiplied with 0AH (10D), and then least significant digit will be added with the result of multiplication. Thus the BCD will be converted to its equivalent hexadecimal form.
Input
Address |
Data |
---|---|
… |
… |
500 |
59 |
… |
… |
Flow Diagram
Program
Output
Address |
Data |
---|---|
… |
… |
600 |
3B |
… |
… |
Advertisements