TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

Basic Logical Operations

Basic Logical Operations with introduction, sets theory, types of sets, set operations, algebra of sets, multisets, induction, relations, functions and algorithms etc.

<< Back to BASIC

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.

  X ⨁ Y ≅ (X ∧∼Y)∨(∼X∧Y). Hence Proved.

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





Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf