converts from number systems with <10 options to the decimal number system