# 6 digit decimal to hexadecimal conversion in assembly

1. ## 6 digit decimal to hexadecimal conversion in assembly

Hi friends

I want to convert a 6 digit decimal no into binary or hex format in assembly language. Please tell me how it could be done

I did for 5 digit conversion now i want for 6digit pl help me

Thank you

•

2. ## Re: 6 digit decimal to hexadecimal conversion in assembly

Are the six digits in binary code decimal (BCD) or ASCII? Or something else?

•

3. ## Re: 6 digit decimal to hexadecimal conversion in assembly

It is good you know how to do it for 5-digit because I have to work on it if I will need it :)
But I can't see why 6-digit conversion has to be different from the 5-digit one.
First, 5 decimal digits (maximum 99999) will result if converted to binary as 3 bytes. The same applies for 6 decimal digits.
Second, after you multiply the 6th digit by 10 and add the result to the 5th one, you can continue to get the 3-byte result by using your method of the 5-digit conversion.

Kerim

1 members found this post helpful.

•

4. ## Re: 6 digit decimal to hexadecimal conversion in assembly

Hi

Actually i did the conversion for till 65535 after that i don't know how to do for the next counts so I am asking for help....

Thank you..

---------- Post added at 10:51 ---------- Previous post was at 10:49 ----------

Originally Posted by bigdogguru
Are the six digits in binary code decimal (BCD) or ASCII? Or something else?
I am using the BCD

Thank you

--[[ ]]--