title: JAVA Byte Manipulation
body: <p>I want to read a binary file and do some manipulation on each byte. I want to test that I am manipulating the bytes correctly. I want to set a byte variable1 to "00000000" and then another byte variable2 set at "00001111" and OR them newvariable = variable1|variable2, shift the newvariable &lt;&lt; 4 bits and then print out the int value. </p>
  
  <pre><code> byte a = 00000000;
   //Convert first oneByte to 4 bits and then xor with a;
   byte b = 00001111;
   byte c = (byte)(a|b);
   c = c &lt;&lt; 4;
   System.out.println("byte= " + c + "\n");
  </code></pre>
  
  <p>I am not sure why I keep getting "incompatiable types:possible lossy conversion from byte to int"</p>