+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Member level 1
    Points: 637, Level: 5

    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    38
    Helped
    2 / 2
    Points
    637
    Level
    5

    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

    •   AltAdvertisement

        
       

  2. #2
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2358 / 2358
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: 6 digit decimal to hexadecimal conversion in assembly

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



    •   AltAdvertisement

        
       

  3. #3
    Advanced Member level 4
    Points: 7,913, Level: 21
    KerimF's Avatar
    Join Date
    May 2011
    Location
    Syria
    Posts
    1,461
    Helped
    380 / 380
    Points
    7,913
    Level
    21

    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.

    •   AltAdvertisement

        
       

  4. #4
    Member level 1
    Points: 637, Level: 5

    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    38
    Helped
    2 / 2
    Points
    637
    Level
    5

    Re: 6 digit decimal to hexadecimal conversion in assembly

    Hi

    Thanks for your reply...

    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 ----------

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

    Thank you



--[[ ]]--