+ 3
Define Bitwise Operators in Java
2 Antworten
+ 5
Bitwise operators work on binary digits or bits of input values. We can apply these to the integer types – long, int, short, char, and byte.
Bitwise operators work on a binary equivalent of decimal numbers and perform operations on them bit by bit as per the given operator:
1. First, the operands are converted to their binary representation
2. Next, the operator is applied to each binary number and the result is calculated
3. Finally, the result is converted back to its decimal representation
Bitwise operators are further classified as bitwise logical and bitwise shift operators
The bitwise logical operators are AND(&), OR(|), XOR(^), and NOT(~).
Bitwise shift operators are further classified as bitwise left and bitwise right shift operators.
0
U can do bit wise operation using bit wise operator