Think of it like hundreds, tens and units that you use naturally with base 10. The columns there are 1s, 10s, 100s, 1000s (powers of 10), .... In hex, they are 1s, 16s, 16x16s (256s), 16x16x16s (4096s) (powers of 16), ...The numbers between 9 and 15 are represented by letters.
10=A
11=B
12=C
13=D
14=E
15=F
So when you see a number like 7fe, then you think
7*16*16+f*16+e
=7*256+f*16+e
=1792*15*16+14
=1792+240+14
=2046
Binary is the same, except the columns are powers of 2, ie 1,2,4,8,16,32,64...
So the number
1011
=1*8 + 0*4 + 1*2 + 1*1
=11
There are real benefits to using the different representations. Often computers work in bits, and you might want to isolate one of those bits from a byte. C unfortunately doesn't support binary as a number format.
When we work with colours we often use a 32 bit integer for each pixel. That integer contains the alpha, red, green, blue for each pixel.
Using hex we can isolate each part, which is 0-255 decimal by doing
blue = colour & ff
green = colour & ff00
red = colour & ff0000
I had a great tutorial for this at the yabasic forums. Can anyone find it?
Please post again if there's confusion - this isn't a great post...
Jim