Logic/Exclusive disjunction

From Internet Web School

(Difference between revisions)
Jump to: navigation, search
(Created page with 'Logic > Exclusive disjunction == Contents == * Category:Mathematical logic(Wikipedia) * [[wikipedia:Boolean_algebra_(logic)|…')
 
Line 6: Line 6:
* [[wikipedia:Boolean_algebra_(logic)|Boolean algebra (logic)]]
* [[wikipedia:Boolean_algebra_(logic)|Boolean algebra (logic)]]
* [[wikipedia:Exclusive_or|Exclusive or]]
* [[wikipedia:Exclusive_or|Exclusive or]]
 +
 +
== 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.
 +
 +
{| border="1" class="wikitable" style="background-color:#ddf"
 +
! style="background:#ffdead;" | P 
 +
! style="background:#ffdead;" | Q 
 +
! style="background:#ffdead;" | 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).
 +
 +
{| border="1" class="wikitable" style="background-color:#ddf"
 +
! style="background:#ffdead;" | P 
 +
! style="background:#ffdead;" | Q 
 +
! style="background:#ffdead;" | ¬P 
 +
! style="background:#ffdead;" | ¬Q 
 +
! style="background:#ffdead;" | P∨¬Q 
 +
! style="background:#ffdead;" | ¬P∨Q 
 +
! style="background:#ffdead;" | (P∨¬Q)∧(¬P∨Q) 
 +
! style="background:#ffdead;" | ¬((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).
== CAI Exercise ==
== CAI Exercise ==

Latest revision as of 08:30, 23 May 2014

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!

  1. Derive xor by two logical operator(negation and logical disjunction).
  2. Derive xor by two logical operator(negation and logical conjunction).

CAI Exercise

Personal tools
In other languages