๐Ÿ“˜ Lesson 1 of 9 ยท Discrete Mathematics

๐Ÿง  Logic

Logic is the study of valid reasoning โ€” the rules that let us combine true and false statements to build sound arguments, and the foundation of how computers make decisions.

Course progress: 11%

01 Key Concepts

Propositions

A statement that is either true or false, but not both, such as 'It is raining' or '2+2=4'.

Logical Connectives

AND (conjunction, true only if both parts are true), OR (disjunction, true if at least one part is true), NOT (negation, flips true/false).

Implication (if...then)

'P implies Q' is false only when P is true and Q is false; in every other case, it's true.

Biconditional (if and only if)

'P iff Q' is true exactly when P and Q have the same truth value (both true or both false).

Truth Tables

A table that lists every possible combination of truth values for the propositions involved, showing the result of a logical expression in each case.

02 Solved Examples

Example 1 Construct the truth table for P AND Q.
  1. List all combinations of P and Q: (T,T), (T,F), (F,T), (F,F).
  2. P AND Q is true only when both are true.
Answer: T AND T = T; T AND F = F; F AND T = F; F AND F = F
Example 2 Construct the truth table for P OR Q.
  1. List all combinations of P and Q.
  2. P OR Q is true whenever at least one of them is true.
Answer: T OR T = T; T OR F = T; F OR T = T; F OR F = F
Example 3 Evaluate 'P implies Q' when P is true and Q is false.
  1. Implication is false only in the one case where P is true and Q is false.
  2. This is exactly that case.
Answer: False

03 Practice Questions

1Evaluate NOT(True).
False
2Evaluate True AND False.
False
3Evaluate False OR True.
True
4Evaluate 'P implies Q' when P is false and Q is true.
True (implication is only false when P is true and Q is false)
5Evaluate 'P iff Q' when both P and Q are false.
True

๐Ÿ“„ Logic โ€” Downloadable Worksheet

10 questions with a full answer key. Grab the PDF to print, or try the interactive version in your browser.