Bitwise Operators

What is Bitwise Operator?

This operator is symbolized by “ | ”. First, let’s see how this operator performs its work.

  • The first step is to convert the operands to their binary representation.
  • Then, this operator is applied to each binary number and calculates the result.
  • At last, the result is again converted to its integer form.

Java provides several bitwise operators:

  • Bitwise AND (&)
  • Bitwise OR (|)
  • Bitwise XOR (^)
  • Bitwise NOT (~)
  • Right Shift (>>)

 

 

 

Visited 1 times, 1 visit(s) today

Comments are closed.

Close