Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/16/02 14:47
Read: times


 
#23045 - RE: HexToDec code
The code I posted is not HexToDec, it's HexToAscii for a single nibble... I'm suprised Mihasic didn't notice that. To use it, you convert your 8 bit hex into 2 nibbles.

As far as I know there is no simple method for converting to decimal. I had a trick that worked if the number was 0-99. In that case the number would be prepped by dividing by 10, multiplying by 6, and added to the orginal number and sent through HexToAscii, avoiding one division by 10.

Bin2Ascii = HexToAscii((x/10)*6+x). Perhaps there is a better way to do this with DA too.

Hex(Bin) to Decimal has been discussed many times here. It involves dividing by 10 repeatedly.

List of 21 messages in thread
TopicAuthorDate
HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code, Mihasic            01/01/70 00:00      
RE: HexToDec code, Mihasic            01/01/70 00:00      
RE: HexToDec code, Mihasic            01/01/70 00:00      
RE: HexToDec code, Mihasic            01/01/70 00:00      
RE: HexToDec code, Mihasic            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code, Mihasic            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code Charles B            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      
RE: HexToDec code            01/01/70 00:00      

Back to Subject List