0-9: Same as decimal.
A: Decimal 10
B: decimal 1 1
C: decimal 12
D: decimal 13
E: decimal 14
F: decimal 15
That is to say, the maximum hexadecimal number of a number is f, decimal means 16, hexadecimal means 10, and so on.
Hexadecimal 0 1FF means that the first digit is f, the second digit is also f, and the third digit is 1, that's all.
Hexadecimal 0 1FF = decimal1* 256+16+15 = 51.