Yes, definitely.
Use XOR property, ie

p = p XOR b
changes p according to value of b

p = p XOR b
you get back the original p....