incorrect description of the XOR operator on BitMath Playground page
incorrect description of the XOR operator in the following webpage: http://playground.arduino.cc/Code/BitMath#bitwise_xor
current wording: "The bitwise XOR operator is written using the caret symbol ^. This operator is very similar to the bitwise OR operator |, only it evaluates to 0 for a given bit position when both of the input bits for that position are 1"
suggested wording: "The bitwise XOR operator is written using the caret symbol ^. This operator is very similar to the bitwise OR operator |, only it evaluates to 0 for a given bit position when both of the input bits for that position are either 0 or 1"
Hmm, the current wording is indeed wrong. However, you're new wording is slightly confusing, you could interpret it as if XOR always returns 0, since any bit is by defintion either 0 or 1. How about:
The bitwise XOR operator is written using the caret symbol ^. This operator is very similar to the bitwise OR operator |, only it evaluates to 1 for a given bit position when exactly one of the input bits for that position is 1. If both are 0 or both are 1, the XOR operator evaluates to 0.
Yes, I see what you mean. Your suggestion is more clear. Thanks.
Thanks @matthijskooijman
For future reference, pages on playground.arduino.cc are part of a publically editable wiki.