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.
Example:
byteOne = 01010101
byteTwo = 11111111
byteOne becomes 01010100 due to the least significant bit in byteTwo
Thanks!
Try the following: