I was just wondering ...
If you have a Hex number and want to switch it to Dec.
Is this how to do it ?

Lets take for example ... 9Fh (Hex To Dec).

Code:
9 x 16^0 = 9 x 1 = 9
F x 16^1 = 15 x 16 = 240
Answer: 249 <--- Decimal Number of 9Fh.

Lets do Dec To Hex using the number 1529 (Dec To Hex).


Code:
1529 / 16 = 95,5625
95 X 16 = 1520
1529 - 1520 = 9 CONVERTED INTO HEX: 9

95 / 16 = 5,9375
5 x 16 = 80
95 - 80 = 15 CONVERTED INTO HEX: F

5 / 16 = 0.3125
0 x 16 = 0
5 - 0 = 5 CONVERTED INTO HEX: 5

Answer: 5F9h
If something is wrong .. Please tell me witch is the correct way to do it.


Note: You may see 9Fh <-- The h at the end is just to tell you that its a Hexadecimal number. Depends in witch languages.In C++ it will look like this .. 0x96.In VB it will look like this ... &H96. You use the h after the hex address in ASM if I am not mistaking.I am currently TRYING to learn ASM. xD

Thanks for helping out.