convert a number from one base to another