Javatpoint Logo
Javatpoint Logo

Basic Logical Operations

1. Negation: It means the opposite of the original statement. If p is a statement, then the negation of p is denoted by ~p and read as 'it is not the case that p.' So, if p is true then ~ p is false and vice versa.

Example: If statement p is Paris is in France, then ~ p is 'Paris is not in France'.

p ~ p
T F
F T

2. Conjunction: It means Anding of two statements. If p, q are two statements, then "p and q" is a compound statement, denoted by p ∧ q and referred as the conjunction of p and q. The conjunction of p and q is true only when both p and q are true. Otherwise, it is false.

p q p ∧ q
T T T
T F F
F T F
F F F

3. Disjunction: It means Oring of two statements. If p, q are two statements, then "p or q" is a compound statement, denoted by p ∨ q and referred to as the disjunction of p and q. The disjunction of p and q is true whenever at least one of the two statements is true, and it is false only when both p and q are false.

p q p ∨ q
T T T
T F T
F T T
F F F

4. Implication / if-then (⟶): An implication p⟶q is the proposition "if p, then q." It is false if p is true and q is false. The rest cases are true.

p q p ⟶ q
T T T
T F F
F T T
F F F

5. If and Only If (↔): p ↔ q is bi-conditional logical connective which is true when p and q are same, i.e., both are false or both are true.

p q p ↔ q
T T T
T F F
F T F
F F T

Derived Connectors

1. NAND: It means negation after ANDing of two statements. Assume p and q be two propositions. Nanding of pand q to be a proposition which is false when both p and q are true, otherwise true. It is denoted by p ↑ q.

p q p ∨ q
T T F
T F T
F T T
F F T

2. NOR or Joint Denial: It means negation after ORing of two statements. Assume p and q be two propositions. NORing of p and q to be a proposition which is true when both p and q are false, otherwise false. It is denoted by p ↑ q.

p q p ↓ q
T T F
T F F
F T F
F F T

3. XOR: Assume p and q be two propositions. XORing of p and q is true if p is true or q is true but not both and vice-versa. It is denoted by p ⨁ q.

p q p ⨁ q
T T F
T F T
F T T
F F F

Example1: Prove that X ⨁ Y ≅ (X ∧∼Y)∨(∼X∧Y).

Solution: Construct the truth table for both the propositions.

X Y X⨁Y ∼Y ∼X X ∧∼Y ∼X∧Y (X ∧∼Y)∨(∼X∧Y)
T T F F F F F F
T F T T F T F T
F T T F T F T T
F F F T T F F F

As the truth table for both the proposition is the same.

Example2: Show that (p ⨁q) ∨(p↓q) is equivalent to p ↑ q.

Solution: Construct the truth table for both the propositions.

p q p⨁q (p↓q) (p⨁q)∨ (p↓q) p ↑ q
T T F F F F
T F T F T T
F T T F T T
F F F T T T





Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA