Bitwise Operators ...........


Bitwise Operators:




   The operators which are used to manipulate data at bit level are called Bitwise operators.

Bitwise operators work only on integer type and char type operands.

These are classified as follows.

1. Bitwise Logical Operators

2. Bitwise shift operators

3. One’s complement operator.

Operator
Description
Let x is 010101 and        
      y is 100101
 &
Bitwise AND
x & y
i.e., 000101
|
Bitwise OR
x | y
i.e., 110101
^
Bitwise exclusive OR
x^y
i.e., 11000
<< 
Left shift
X << 2
i.e., 010100
>> 
Right shift
X >>2
i.e., 000101