XORing least significant bits in java
<p>I've read a ton about bitwise arithmetic in Java but I always seem to somehow get it wrong. I'm trying to figure out how to XOR the two least significant bits in two bytes of java.</p>

<p>Example:</p>

<p>byteOne = 01010101
byteTwo = 11111111
byteOne becomes 01010100 due to the least significant bit in byteTwo</p>

<p>Thanks!</p>
