Computer – 位运算

1 and 1 = 1

0 and 1 = 0

1 and 0 = 0

0 and 0 = 0

1 or 1 = 1

0 or 1 = 1

1 or 0 = 1

0 or 0 = 0

异或[相同为0,不同为1]

1 xor 1 = 0

1 xor 0 = 1

0 xor 1 = 1

0 xor 0 = 0

发表回复