Utility to convert between different number bases.