How is it calculated?
The number is first converted to decimal (each digit is multiplied by the base raised to its position and the results are added). It is then written in the target base by repeated division.
Example
255 (decimal) = 11111111 (binary) = FF (hex).