As the name suggests bitwise operators are used for operation on bits. They are used for testing and shifting of actual bits in a byte or word. It is used for int and char data types. I cannot be used for float and double and other complex data types. Here are the bitwise operators:
|^||Exclusive OR (XOR)|
|~||One’s complement (NOT)|
Here’s a truth table to see the logic of XOR: Output a^b is true only when one input a or b is true.
Bitwise operators are generally used in device drivers, disk file routines and printer routines.