Logical Operators are those that are used for doing logical operations. There are a total of 6 logical operators (&, |, ^, !, &&, and ‖)
Bitwise Operators
Of the six logical operators listed above, three of them (&, |, and ^) can also be used as “bitwise” operators. Here are several legal statements that use bitwise operators:
byte b1 = 6 & 8;
byte b2 = 7 | 9;
byte b3 = 5 ^ 4;