<<, >>
Bit shift left and right, respectively. If you imagine the left operand as a binary sequence of bits, you are shifting those to the left or right by the number of bits indicated by the right operand.
&, ^, |
These are bitwise and, xor, and or, respectively. You can think of &
and |
as the counterparts to &&
and ||
, except that they will treat their operands as bit vectors, and perform the logical operations on each of the bits. There is no ^^
operator, but this operation is "xor" or "exclusive or". You can think of "a xor b" as "a or b, but not both".
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…