Explain different bitwise operators.
Question :
Explain different bitwise operators.
& (AND) : Sets each bit to 1 if both bits are 1
| (OR) : Sets each bit to 1 if one of two bits is 1
^ (XOR) : Sets each bit to 1 if only one of two bits is 1
~ (NOT) : Inverts all the bits
<< (Left Shift) : Zera fill left shift enables to shift left by pushing zeros in from the right and lets the leftmost bits fall off.
>> (Right Shift) : Signed right shift enable to shift right by pushing copies of the leftmost bit in from the left, and lets the rightmost bits fall off.