What is the bitwise OR 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 OR operator?
Rating:
The bitwise OR operator is a binary operator that produces a 1 bit if either of the bits in the operands is a 1. 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 OR operation when applied to operands opr1 and opr2:
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Rating:
Was this information helpful?
Other articles
- What is the BufferedWriter class?
- What is the switch statement?
- What is the start() method?
- What is a local class?
- What is the Vector class?