Navigation
Mathematical Logic & Truth Tables
Introduction to logic statements, truth values, and logical connectives used in computational theory.
Mathematical Logic & Truth Tables Mathematical Logic for MCA
Mathematical Logic for MCA
Logic is the foundation of computer science. In this section, we will cover the basic concepts of mathematical logic, including statements, logical connectives, and truth tables.
1. Statements
A statement (or proposition) is a declarative sentence that is either true or false, but not both.
Example:
- "The Earth is round" (True)
- "$$2 + 2 = 5$$" (False)
2. Logical Connectives
We use connectives to build compound statements.
A. Conjunction (AND)
The conjunction of and is denoted by . It is true only if both and are true.
| $p$ | $q$ | $p \land q$ |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
B. Disjunction (OR)
The disjunction of and is denoted by . It is false only if both and are false.
C. Negation (NOT)
The negation of is denoted by . It has the opposite truth value of .
3. Conditional and Biconditional
- Conditional: $p \to q$ (If $p$, then $q$)
- Biconditional: $p \leftrightarrow q$ ($p$ if and only if $q$)
Contrapositive
The contrapositive of is .
Theorem: A conditional statement is logically equivalent to its contrapositive.
4. Tautology and Contradiction
- Tautology: A compound statement that is always true (e.g., $p \lor \neg p$).
- Contradiction: A compound statement that is always false (e.g., $p \land \neg p$).
Summary
Understanding these basics is crucial for digital logic and programming.
