convert a value from one base to another