A bitwise operation works on each bit position separately. In Python, a & b has a where both a and b have a (and); a | b where at least one has a (or); a ^ b where exactly one has a (exclusive or, xor); and ~a flips every bit (not; for Python’s integers, ~a equals -a - 1).
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表