^ The values โโof XOR, XOR are defined as true if one, but not both sides, are true and in each other case are defined as false.
So,
z ^ = v means z = false ^ true which means true
z ^ = true means z = true ^ true, which is not true
Note that ^ = changes the value of the variable in the first and second statements
source share