Bitwise xor 0xFFFFFFFF?
问题 I couldn't wrap my head around this: def expr(a): return ~(a ^ 0xFFFFFFFF), a ^ 0xFFFFFFFF, ~a, a print(expr(0xFFFFFFFF)) print(expr(1)) print(expr(0)) print(expr(-1)) I understand ~a means two's complement of a , but a ^ 0xFFFFFFFF also flips all the bits, but python will interpret it as a large number. I know Python3 is using unbound integer size, how does that work? Can someone ELI5 (Explain Like I'm Five)? Results: ( -1, 0, -4294967296, 4294967295) (-4294967295, 4294967294, -2, 1) (