Converts number to and from base 2-16