I'm trying to learn assembly language but am having some difficulty learning hexadecimal conversion. How can I convert a hexadecimal number into a decimal number? (I know it is base 16)
Thanx
Printable View
I'm trying to learn assembly language but am having some difficulty learning hexadecimal conversion. How can I convert a hexadecimal number into a decimal number? (I know it is base 16)
Thanx
since the positions are weighted all you need to do is multiply the digits by there weighted value and add, here's a couple examples:
356(16) = 3x16^2 + 5x16^1 + 6x16^0
356(16) = 768 + 80 + 6
356(16) = 854(10)
2AF(16) = 2x16^2 + 10x16^1 + 15x16^0
2AF(16) = 512 + 160 + 15
2AF(16) = 687(10)
if you want a easy way to convert just use the calculator that comes with Windows (needs to be set to Scientific)