def location_to_string(locationID):
    """
    helper to calculate port and bus number from locationID
    """
    loc = ['{}-'.format(locationID >> 24)]
    while locationID & 15728640:
        if len(loc) > 1:
            loc.append('.')
        loc.append('{}'.format(locationID >> 20 & 15))
        locationID <<= 4
    return ''.join(loc)
