What is the bitwise AND 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 AND operator?
Rating:
The bitwise AND operator is a binary operator that produces a 1 bit if both of the bits in the operands are 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 AND operation when applied to operands opr1 and opr2:
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Rating:
Was this information helpful?
Other articles
- Constructors
- What is the booleanValue() method?
- What is ClassCastException?
- What are static variables?
- What is the instanceof operator?