If all you want to do is set and reset bits you don't need an XOR function, as the & and | perform those functions. XOR would be more suited to toggling bits.