A type of operator that can group input values together. These are similar to logical operators but only work with bits – the 1s and 0s of machine code).

& (AND)ANDSets each bit to 1 if both bits are 1
| (OR)ORSets each bit to 1 if one of two bits is 1
^ (XOR)XORSets each bit to 1 if only one of two bits is 1
~ (NOT)NOTInverts all the bits
<< (Zero fill left shift)Zero fill left shiftShift left by pushing zeros in from the right and let the leftmost bits fall off
>> (Signed right shift)Signed right shiftShift right by pushing copies of the leftmost bit in from the left, and let the rightmost bits fall off