|
We're glad you came by, but you might find what you're looking for elsewhere. TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it. Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope. |
Exclusive or statement. Returns the truth value of value1 or value2, but not both, being true.
value1 xor value2
xor takes two numbers of expressions and checks to see if exactly one is True. If both are True or both are False, it returns 0.
1 xor 0
1
:2 xor (3 xor 0) (after evaluating 3 xor 0, it simplifies into True xor True.)
0
:0 xor (1-1)^2
0Table of Results
For reference, the following true/false table shows what gets returned when you use different combinations of 1 (true) and 0 (false):
| xor | 1 (true) | 0 (false) |
|---|---|---|
| 1 (true) | 0 (false) | 1 (true) |
| 0 (false) | 1 (true) | 0 (false) |