位运算
作者:互联网
|= 按位或运算,a|=b : 把a和b按位或然后赋值给a,相当于a=a|b
& 按位与, | 按位或 , ^ 按位异或 AND (位与&) OR ( 位或| ) XOR ( 位异或^ ) 1 & 1 = 1, 1 | 1 = 1, 1 ^ 1 = 0 1 & 0 = 0, 1 | 0 = 1, 1 ^ 0 = 1 0 & 1 = 0, 0 | 1 = 1, 0 ^ 1 = 1 0 & 0 = 0, 0 | 0 = 0, 0 ^ 0 = 0
标签:XOR,运算,异或,按位,相当于,赋值 来源: https://www.cnblogs.com/zhangxiaoxi/p/14857797.html