def signed2unsigned(value, width=32):
    """ convert a signed value to it's 2 complement unsigned
        encoding """
    if value >= 0:
        return int(value)
    else:
        return int(value + 2**(width) )