Hexadecimal is a number less than sixteen, so a remainder is needed. For example, given a number 100, the first remainder is 100% 16=4, then 100/ 16=6, and the second remainder is 6% 66. Then 6/ 16=0, and the operation is over. So the hexadecimal result of 100 is 64; When hexadecimal reaches 9, it is represented by letters, so in the process of finding the remainder, the remainder is recorded first and output by array. For example, let c[2]={ 1 1,12}; Output time: d = c [0] =11; b[c[0]]= b[d]= b[ 1 1]= A; d = c[ 1]; B[c[ 1]]= B[d]= B[ 12]= B .
If you really don't understand, you can look at the process of converting decimal to binary, and the principle of converting to binary is similar. .