The values 10 to 15 are represented by the letters 'a' through 'f'. So, to count from 0 to 20 in hex, you say: 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,10,11,12,13,14. (14 in hex is 20 in decimal.)

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 ^{2} + 2x10^{1} + 4x10^{0}

When you say 124 in hex, you're saying ^{2} + 2x16^{1} + 4x16^{0}

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 16^{1} 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.