Decimal
0
1
2
3
4
5
6
7
8
9

Hexadecimal
0...9
A is 10
B is 11
C is 12
D is 13
E is 
F is 15
10 is 16 or 0x10
11 is 17 or 0x11
12 is 18 or 0x12
13 is 19 or 0x13
14 is 20 or 0x14
15 is 21 or 0x15
16 is 22 or 0x16
17 is 23 or 0x17
18 is 24 or 0x18
19 is 25 or 0x19
1A is 26 or 0x1A
1B is 27 or 0x1B
1C is 28 or 0x1C
1D is 29 or 0x1D
1E is 30 or 0x1E
1F is 31 or 0x1F
20 is 32 or 0x20
21 is 33 or 0x21
22 is 34 or 0x22
23 is 35 or 0x23
24 is 36 or 0x24
25 is 37 or 0x25
26 is 38 or 0x26
27 is 39 or 0x27
28 is 40 or 0x28
29 is 41 or 0x29
2A is 42 or 0x2A
2B is 43 or 0x2B
2C is 44 or 0x2C
2D is 45 or 0x2D
2E is 46 or 0x2E
2F is 47 or 0x2F
30 is 48 or 0x30 ... and so on

Binary
       | 1 place
      || 2 place
     ||| 4 place
    |||| 8 place
   ||||| 16 place
  |||||| 32 place
 ||||||| 64 place
|||||||| 128 place 

0 
1
10 is 2
11 is 3
100 is 4
101 is 5
110 is 6
111 is 7
1000 is 8 
1001 is 9
1010 is 10
1011 is 11
1100 is 12
1101 is 13
1110 is 14
1111 is 15
10000 is 16
10001 is 17
10010 is 18
10011 is 19
10100 is 20

0b11001010 --> Decimal
2 + 8 + 64 + 128 = 202

0b1010 1100 --> Hex
0xAC --> Decimal
(10 * 16) + 12 = 172

0b1111 1111
0xFF
(15 * 16) + 15 = 255