title: Effect of a Bitwise Operator on a Boolean in Java
body: <p>The bitwise operators are supposed to travel variables and operate on them bit by bit.  In the case of integers, longs, chars this makes sense.  These variables can contain the full range of values enforced by their size.  </p>
  
  <p>In the case of booleans, however, a boolean can contain only two values.  1 = true or 0 = false.  But the size of the boolean isn't defined.  It can be as big as a byte or as small a bit.  </p>
  
  <p>So what's the effect of using a bitwise operator on a boolean?  Does the JVM essentially translate it to a normal logical operator and move on?  Does it treat the boolean as a single bit entity for the purpose of the operation?  Or is the result undefined along with the size of a boolean?</p>