Think about number systems like this .....
In base 10 number system we have the
10^3=1000 10^2=100 10^1=10 10^0=1
these are our different places.. 1's 10's 100's .........
its the same in any number system... The difference is that instead of 0 through 10 in base 10... in hex we have 0 through 9 and A through F ....
for hex...
16^4=65,536 16^3=4096 16^2=256 16^1=16 16^0=16
Lets say that we want to represent the number 4016 first in decimal then in hex below
10^4=10000 10^3=1000 10^2=100 10^1=10 10^0=1
we have 0 10,000's 4 1000's 0 100's 1 10's and 6 1's
now in hex
16^4=65,536 16^3=4096 16^2=256 16^1=16 16^0=1
we have 15 256's and 11 16's and 0 1's
to total 3840 with a remainder of 176 with a 0 remainder
the letter that cooresponds to 15 in hex is F
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
the letter that cooresponds to 11 in hex is B
therefore 4016 in base 10 can be represented as FB0 in base 16
This method if it makes any sense can be used for any base number system...
if this is a confusing way to explain it I can try a different method just let me know