Bitwise OPERATOR:
The integer operand is considered as a set of binary BITs, which provides the test and setting functions for each bit.
~ : Reverse by bit
<: Shifts left. 1 to 2.
: The right operand identifies the number of digits to move left to generate a new value, discard the removed bits, and insert 0 on the right to supplement the empty space.
>>: Right shift. 1 shifted to/2.
: Its operand identifies the number of digits to be shifted to the right to generate a new value and discard the removed bits.
: If the operand on the right is the unsigned number, 0 is inserted from the left. If the operand is the signed number, the value of the signed bit is inserted or 0.
Note: The right operand of the shift operation cannot be a negative number, and must be a value Strictly less than the number of digits of the left operand. Otherwise it is meaningless.
&: Bitwise AND, if there is 0, the result is 0.
|: Bitwise or, if there is 1, or the result is 1
^: Exclusive or. If two values are different, 1 is used. If the two values are the same, 0 is used.
Note: Since the system cannot ensure how to handle the symbol bit of the operand, we recommend that you use the unsigned integer operand.
Bitwise OPERATOR:
The integer operand is considered as a set of binary BITs, which provides the test and setting functions for each bit.
~ : Reverse by bit
<: Shifts left. 1 to 2.
: The right operand identifies the number of digits to move left to generate a new value, discard the removed bits, and insert 0 on the right to supplement the empty space.
>>: Right shift. 1 shifted to/2.
: Its operand identifies the number of digits to be shifted to the right to generate a new value and discard the removed bits.
: If the operand on the right is the unsigned number, 0 is inserted from the left. If the operand is the signed number, the value of the signed bit is inserted or 0.
Note: The right operand of the shift operation cannot be a negative number, and must be a value Strictly less than the number of digits of the left operand. Otherwise it is meaningless.
&: Bitwise AND, if there is 0, the result is 0.
|: Bitwise or, if there is 1, or the result is 1
^: Exclusive or. If two values are different, 1 is used. If the two values are the same, 0 is used.
Note: Since the system cannot ensure how to handle the symbol bit of the operand, we recommend that you use the unsigned integer operand.