Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does Exclusive in XOR really mean?

Maybe this is just obvious to everyone but can someone explain where XOR (or Exclusive-OR) got its name from? What does the word Exclusive really mean? Not that it matters, but its just stuck in my head since morning.

OR:
0 0 0
0 1 1
1 0 1
1 1 1

XOR:
0 0 0
0 1 1
1 0 1
1 1 0

Is it "exclusively 0 for inputs 1,1", "special version of OR" or something else?

like image 576
Legend Avatar asked Mar 05 '11 22:03

Legend


2 Answers

It's what children understand as OR

You can have chocolate OR you can have ice cream

But a programmer would regard this as having both!

Q: "Would you like tea or coffee"
Annoying programmer answer = yes

like image 199
Martin Beckett Avatar answered Oct 12 '22 14:10

Martin Beckett


XOR is an "exclusive OR" because it only returns a "true" value of 1 if the two values are exclusive, i.e. they are both different.

like image 22
dlanod Avatar answered Oct 12 '22 13:10

dlanod