Bitwise operator operates on bits and performs bit by bit operations.
Let's look at each one by one:
1. & AND :
0101
0110
______
0100
2. | OR
0101
0110
______
0111
3. ^XOR
0101
0110
______
0011
4. ~ One's component
~0101
_______
1010
5. << left shift
4<<1
(0100)<<1
______
1000
6. >> right shift
4>>1
(0100)<<1
_______
0010
a<<n :- a*2^n
a>>n :-a/2^n