Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Hex to Decimal

Jmc33Jmc33 Member Posts: 6
Hello All,

Anyone know of a shortcut from converting a Hex string into its decimal counterpart? I am writing an assembly (ARM) program in which I need to make this conversion, my instruction hinted of a shortcut using the ASCII numeric value for each character of the HEX string (or something of that nature), but I am unable to discover this shortcut on my own? Any Ideas? Thanks :)

-Jmc

Comments

  • peretperet Member Posts: 69
    : Anyone know of a shortcut from converting a Hex string into its decimal counterpart? I am writing an assembly (ARM) program in which I need to make this conversion, my instruction hinted of a shortcut using the ASCII numeric value for each character of the HEX string (or something of that nature), but I am unable to discover this shortcut on my own? Any Ideas? Thanks :)

    Sorry, but there is no shortcut. You have to divide the entire hex string (in binary) by 10, repeatedly, until the quotient is 0. The remainder at each stage is the next most significant decimal digit. OR it with 30 hex to get an ASCII digit.

Sign In or Register to comment.