very easy
just you divide by base, save remainder until 0

collect bottom to top
let us conver 12 to binary
i mean 12 base 10

now let us take hex
or base 16
let us convert 217 base 10 to base 16


one more example
217 b10 to b8