Flipping bits

  • + 0 comments

    def flippingBits(n): return n ^ 0xFFFFFFFF # XOR with a 32-bit mask