

In our program, the lower digit is converted in to its equivalent decimal value by using DA A instruction to get BCD1, the higher digit is shifted to lower digit position then multiplied by 6 and added it to 06 if one carry generated or added it to 12 10 if two carries generated to get BCD2. The 8051 Assembly language program written by us will conveniently convert Hexadecimal numbers 00-7FH to their equivalent Decimal numbers 00 to 127 10, which are used to display timer values in Traffic lights, Digital Balances etc. The 8051 microcontroller is an 8 bit microprocessor and its instruction DA A will convert Hex digit in Accumulator in to its equivalent BCD format, but it may not give the decimal equivalent.

Therefore, there is a need of conversion of Hex numbers in to its equivalent decimal numbers to display on seven segment displays.

But, the human beings are routinely practiced to use decimal number systems. The most convenient number system for microprocessors / microcontrollers is hexadecimal number system.
