Today, I was asked how to convert an integer to hexadecimal, at first I thought I remembered it, sat down and got blocked. Well I didn’t remember, well that was embarrassing. So I learned it again (imagine how I felt when I found how stupid I was). Lets start.
First step, take one number (integer of course), 23 for example
Second step, divide our number by 16 and write down the remainder (in our case it’s 7, and the result is 1)
Third step, divide the result again with 16 (result is 0 and the remainder is 1)
Fourth step, take the remainders from the last, in our case it’s 1 7 so the hexadecimal representation of number 23 is 17.
See you in the next step