To learn how to covert numbers to hex, first you need to know about what numbers
really mean.
When you say 124 in decimal, what you're really saying is
When you say 124 in hex, you're saying
So, to convert a number from hex to decimal, just write it out in exponential form
and add everything up. (That's what I did above.)
To convert decimal to hex takes a little more math.
Take your decimal number and divide it by 16. The remainder is the "ones" digit.
Divide the result by 16 again, and that remainder is the 161 digit. Keep
that up until there's nothing left to divide.
Example: Convert 292 in decimal to hex.
Divide 292 by 16: 292/16 = 18 r 4 (That r means remainder.)
Divide 18 by 16: 18/16 = 1 r 2
Divide 1 by 16: 1/16 = 0 r 1
Now there's nothing more left to divide. So look back at the remainders: 4, 2, and 1. Reverse the order of those, 124, and you have the hex equivalent of decimal 292.
Now, class, for homework I want you to do problems 1 though 658347 on page 49.