convert_to_base function

Convert units to their base units