Hexadecimal: How does FF = 255?

Decimal is base 10
Hexadecimal is base 16

0x0F = 15
0x10 = 16
0x11 = 17

0x1F = 31
0x20 = 32
0x21 = 33

0x7F = 127
0x80 = 128
0x81 = 129

0xFF = 255
0x100 = 256

And so on…

5358 hexadecimalchart1.png