Logic/Exclusive disjunction
From Internet Web School
Revision as of UNIQ26a5941969e73fb9-MathJax-2-QINU2
Logic > Exclusive disjunction
Contents |
Contents
Overview
Exclusive disjunction (or "exclusive or")
Remarks: Exclusive disjunction or exclusive or (xor) True of logical "or" means one side is true and other side is any(true or false). But exclusive "or" means one side is true then other side is must false. This is similar to our conversation in everyday. If I say "Lunch, let's eat a pizza or a hamburger". Usually、this means that I have a pizza or a hamburger , but not both. So, logically exact speech is "a pizza xor a hamburger" , it is not "a pizza or a hamburger" !
Definition of xor by truth table
0 means false, 1 means true.
P | Q | P xor Q |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Exclusive or is derives by three logical operator(negation ,logical disjunction and logical conjunction).
P | Q | ¬P | ¬Q | P∨¬Q | ¬P∨Q | (P∨¬Q)∧(¬P∨Q) | ¬((P∨¬Q)∧(¬P∨Q))= P xor Q |
---|---|---|---|---|---|---|---|
0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 |
0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 |
1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 |
1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 |
Let's Thinking!
- Derive xor by two logical operator(negation and logical disjunction).
- Derive xor by two logical operator(negation and logical conjunction).