Convert a number to a different base (e.g., from hex to decimal)