What is the bitwise XOR operator?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the bitwise XOR operator?
Rating:
The bitwise XOR operator is a binary operator that produces a 1 bit if exactly one of its operands is 1. Otherwise, it produces a 0 bit. It is denoted by the symbol ^. It can be applied to the integer type operands, i.e., byte, short, char, int, and long. The table given below shows the outcome of the XOR operation when applied to the operands opr1 and opr2:
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Rating:
Was this information helpful?
Other articles
- What is the run() method?
- Interfaces
- What is the equals() method?
- What are static variables?
- What is a member class?