Original link: https://www.cnblogs.com/911/archive/2008/05/20/1203477.html
A bitwise operation is a binary-based operation. In system software, it is often necessary to deal with bits problems. The C language provides 6 bit operations.
Operator. These operators can only be used for integer operands, that is, only for signed or unsigned char,short,int and long types
List of bit operators:
&: Bitwise AND if two corresponding bits are 1, then the result value of this bit is 1, otherwise 0
| : A bitwise or two corresponding bits as long as there is a value of 1, the result of the bit is 1
^: Bitwise XOR or if the two bits values of the participating operations are the same then 0, otherwise 1
<<: Left shifts all bits of a number to the left n bits, right 0
>>: Shift right shifts the bits of a number to the right by n bits, to the right end of the low is discarded, for unsigned number, high 0
A detailed description of the C-bit operator