Bitwise Operators are the kind of operators that operates on a Bit-Level. The operators perform their operation bit by bit on integer type data. The bits are mainly in the form of binary digits i.e.1 and 0.
Types of Bitwise Operators with their symbols
S.NO | OPERATOR | SYMBOL | DESCRIPTION |
1 | Bitwise OR | || | This Operator results as 0 bit if any one operand return 0. |
2 | Bitwise AND | & | This Operator return 1 if both the Operand return 1. |
3 | Bitwise XOR | ^ | This operator return 0 if both operands return same bits, i.e. either 0 or 1. |
4 | Bitwise NOT | ~ | This is the Unary Operator that flip the bit to opposite bit. i.e. 1 bit will flit to 0 bit and vice versa. |
5 | Left Shift | << | This is used to shift bits of binary number to left |
6 | Right Shift | >> | This is used to shift bits of binary number to right |