def _fix2comp(num):
 assert (0 <= num < (2 ** 32))
 if (num & (2 ** 31)):
  return (num - (2 ** 32))
 else:
  return num

def _fix2comp ( num ) : assert ( 0 <= num < ( 2 ** 32 ) ) if ( num & ( 2 ** 31 ) ) : return ( num - ( 2 ** 32 ) ) else : return num
convert from twos complement to negative .