Aim:
To perform the following code conversion process using 8086 microprocessor kit.
1) Decimal to Hexadecimal
2) Hexadecimal to Decimal

Algorithm:
Decimal to Hexadecimal
Step 1: Load the values in the register
Step 2: Clear the two registers to compare
Step 3: Increment the register
Step 4: Perform the decimal adjust accumulator and compare the register
Step 5: Jump on non-zero otherwise move the data from the register to the memory
location
Step 6: End of the program


Algorithm for Hexadecimal to Decimal:
Step 1: Start the program
Step 2: Move the input data into .AX register.
Step 3: Divide the input by 10000D.Store the Quotient in the most significant digit of the
decimal number
Step 4: Divide the remainder by 1000D.Store the quotient next to MS digit
Step 5: Divide the remainder by 100D. Store the quotient to obtain 100's digit.
Step 6: Divide the remainder by 10D. Store the quotient in the tens digit. And the remainder
being the units digit of the resultant decimal number.
Step 7: Move the data from AL register to destination location.
Step 8: Stop the program.