Hexadecimal is just four bits represented as a number from 0 to F. 0123456789ABCDEF for a total of 16 possible values. This means that every four bit number can have a direct correlation to one Hexadecimal number. Hex>Bin 0=0000 1=0001 2=0010 3=0011 4=0100 5=0101 6=0110 7=0111 8=1000 9=1001 A=1010 B=1011 C=1100 D=1101 E=1110 F=1111 5F=01011111 The simplest way to convert a decimal number to a hexadecimal number is to first convert it to binary.
0=0,1=1,2=2,3=3,4=4,5=5,6=6,7=7,8=8,9=9,10=A,11=B,12=C,13=D,14=E,15=F
number you want = N ,N / 16 till 0, with the rest you get an order, then you reverse
heptium345: nor do i but +1