In MIPS assembly language.
Given a base (b) from 2 to 10 or 0 to quit and a number up to 5 digits, the program converts it to decimal base. It also checks if the digits are in the right range (0 to b-1) and if the inputs contain only valid characters.