Link to home
Start Free TrialLog in
Avatar of rcherne1
rcherne1Flag for United States of America

asked on

Is Xor an operator or a function?

I learned in school Xor as:

True True = False
True False = True
False True = True
False False = False

I thought of the Xor operator as a operator but found it acts like a function.

I use a Xor b and I get c
Then:
a Xor c = b
b Xor a = c
b Xor c = a
c Xor a = b
c Xor b = a

Example:
15 Xor 100 = 107
15 Xor 107 = 100
100 Xor 15 = 107
100 Xor 107 = 15
107 Xor 15 = 100
107 Xor 100 = 15

What is the math formula?
ASKER CERTIFIED SOLUTION
Avatar of rettiseert
rettiseert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rcherne1

ASKER

Thanks rettiseert I was racking my brain trying to figure this out!