def clockspeed(speed):
    """
    Returns a formatted version of a ``speed`` given in MHz.
    """
    if speed > 1000:
        return str(0.1 * int(10 * (float(speed) / 1000))) + ' GHz'
    else:
        return str(speed) + ' MHz'
