title: Difference between bitwise inclusive or and exclusive or in java
body: <pre><code>public class Operators {
  
      public static void main(String[] args) {        
          int a = 12;
  
      System.out.println("Bitwise AND:"+(12&amp;12));
      System.out.println("Bitwise inclusive OR:"+(12|12));
      System.out.println("Bitwise exclusive OR:"+(12^12));
  
      }
  }
  
  OUTPUT:
  
  Bitwise AND:12
  Bitwise inclusive OR:12
  Bitwise exclusive OR:0
  </code></pre>
  
  <p>I understand first two, but not the third.</p>