Is it possible to describe the method or algorithm to get the decimal from the possible 8 hexadecimal of 32 bit number.... the conversion itself is pretty straight forward but the 8 bit manipulations are confusing...
.
.![]()
Is it possible to describe the method or algorithm to get the decimal from the possible 8 hexadecimal of 32 bit number.... the conversion itself is pretty straight forward but the 8 bit manipulations are confusing...
.
.![]()
Just wanted to thank you once again
No problem Henrik glad you could make it work for you. its good to exercise the grey matter occasionally
@amgen
to which 8bit manipulations do you refer ?the conversion itself is pretty straight forward but the 8 bit manipulations are confusing...
Warning I'm not a teacher
Consider this code.
Is this what you're looking for?Code:dim array[8] as byte ' your hex bytes ($00-$0F) are input here from MSN to LSNibble decimal as long ' 32 bit value decimal = 0 for i = 0 to 7 decimal = decimal * 16 ' nibble max value is 16, so multiply the existing value by 16 to move decimal value one nibble to the left decimal = decimal + array[i] ' add in the new nibble next ' at this point, decimal contains the converted value of the hex digits
Bookmarks