Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Basic - <b>xor logical exclusive or operator</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
XOR                      Logical Exclusive OR Operator

 exp1 XOR exp2

    XOR is a logical operator. BASIC converts each operand to an integer
    (each operand must yield an integer in the range -32768 to 32767, or
    else an Overflow error occurs), then performs a bitwise comparison of
    the results, according to the truth table below:

                     exp1  exp2     exp1 XOR exp2
                       1    1             0
                       1    0             1
                       0    1             1
                       0    0             0

    The result is an integer.

   exp1,exp2    Any expression that produces a numeric result. This
                includes Boolean expressions, where a TRUE result is
                evaluated as -1 and a FALSE result is evaluated as 0.

See Also: AND NOT OR EQV IMP Precedence

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson