Convert a number with any base into a base 10 equivalent