A good answer might be:

number = 247
247 div 16 = 15 r 7    so  digit[ 0 ] = 7

number =  15
 15 div 16 =  0 r 15   so  digit[ 1 ] = F     
                           ("15" is in base 10, 
                            "F" is the hex digit)

Result: 24710 = 0xF7

Another Conversion

Checking the result: 0xF7  =  F × sixteen + 7 × 1  =  15 × 16 + 7  =  240 + 7 = 24710

The algorithm can be described as: Divide the number by the base. The remainder is the digit. The quotient becomes the number. Repeat. The digits come out right to left.

Here is another base conversion. Find pencil and paper and try it.

QUESTION 18:

Convert 103310 to hex.