The integer converted from decimal to hexadecimal is "divide by 16 and take the remainder in reverse order",
For example, 500
500/16 = 31... 4 ( In reverse order, this is the highest bit)
31 /16 = 1 …… 15 (15 is F in hexadecimal)
1 /16 = 0 …… 1
p>So it is 1F4.