异或的性质

(oplus) 为异或运算,异或运算满足以下性质:
1、(x oplus x = 0)
2、(x oplus y = y oplus x(交换律))
3、((x oplus y) oplus z = x oplus (y oplus z) (结合律))
4、(x oplus y oplus y = x(自反性))
5、(forall i in Z,有 4i oplus (4i+1) oplus (4i+2) oplus (4i+3) = 0)
补充:
6、(x oplus y = !x oplus !y)
7、(!x oplus y = x oplus !y = !(x oplus y))
8、设(x)为任意非否偶数,(y = x+1), 则必有(x oplus 1 = y)

原文地址:https://www.cnblogs.com/lemon-jade/p/14737661.html