BIT152Semester II10 units84 solved questions983 study cardsFull study modes
The free sample is open to everyone. Sign in for 2 free weeks of every answer, flashcards and progress.
Logic is the study of correct reasoning. It gives us exact rules to decide whether a statement is true, and it is the base of proofs, programming conditions and digital circuits.
A proposition is a declarative sentence that is either true or false, but not both. The truth value of a proposition is T (true) or F (false).
Examples of propositions:
Examples of non-propositions:
We name propositions with letters such as $p, q, r$. A statement built from smaller ones using connectives is called a compound proposition.
A connective joins propositions to make a new one. A truth table lists the truth value of the compound proposition for every possible choice of truth values of its parts. With $n$ variables the table has $2^n$ rows.
| Name | Symbol | Read as | True when |
|---|---|---|---|
| Negation | $\neg p$ | not $p$ | $p$ is false |
| Conjunction | $p \land q$ | $p$ and $q$ | both are true |
| Disjunction | $p \lor q$ | $p$ or $q$ | at least one is true |
| Exclusive or | $p \oplus q$ | $p$ xor $q$ | exactly one is true |
| Implication | $p \to q$ | if $p$ then $q$ | not ($p$ true and $q$ false) |
| Biconditional | $p \leftrightarrow q$ | $p$ if and only if $q$ | both have the same value |
Truth table for the main connectives:
| $p$ | $q$ | $p \land q$ | $p \lor q$ | $p \oplus q$ | $p \to q$ | $p \leftrightarrow q$ |
|---|---|---|---|---|---|---|
| T | T | T | T | F | T | T |
| T | F | F | T | T | F | F |
| F | T | F | T | T | T | F |
| F | F | F | F | F | T | T |
In $p \to q$, $p$ is the hypothesis and $q$ is the conclusion. An implication is false only when the hypothesis is true and the conclusion is false. If $p$ is false, the implication is true (it is true "by default").
Example. Build the truth table of $(p \lor q) \land \neg r$.
| $p$ | $q$ | $r$ | $p \lor q$ | $\neg r$ | $(p \lor q) \land \neg r$ |
|---|---|---|---|---|---|
| T | T | T | T | F | F |
| T | T | F | T | T | T |
| T | F | T | T | F | F |
| T | F | F | T | T | T |
| F | T | T | T | F | F |
| F | T | F | T | T | T |
| F | F | T | F | F | F |
| F | F | F | F | T | F |
Precedence order: $\neg$ first, then $\land$, then $\lor$, then $\to$, then $\leftrightarrow$.
Discrete Structure for TU BIT is covered here in full, from syllabus notes to solved past questions. This subject has 10 chapters mapped to the official syllabus, and 84 past exam questions with written model answers. The opening of every note and answer is free, and the most-searched questions are free in full. A free account gets 2 free weeks of the whole program plus flashcards and progress tracking so weak topics come back before the exam.
This TU BIT Discrete Structure guide covers Fundamentals of Logic and Propositions, Proof Techniques, Set Theory and Relations, Functions and Mappings, Recurrence Relations and Recursion, Number Theory and Modular Arithmetic, Combinatorics and Counting, Graph Theory Fundamentals, and more, across 10 chapters. It includes model answers to 84 past exam questions, plus flashcards for quick revision.
Discrete Structure has 10 chapters mapped to the official syllabus.
Yes. Each of the 84 past questions comes with a written model answer; the most-searched ones are free in full, the rest open with a free account's 2 free weeks or a pass.
Free to start. The opening of every note and answer is free, the most-searched questions are free in full, and a free account gets 2 free weeks of the whole program plus flashcards and progress tracking. After that a program pass keeps everything open.
Based on the official syllabus.
Logic is the study of correct reasoning. It gives us exact rules to decide whether a statement is true, and it is the base of proofs, programming conditions and digital circuits.
A proposition is a declarative sentence that is either true or false, but not both. The truth value of a proposition is T (true) or F (false).
Examples of propositions:
Examples of non-propositions:
We name propositions with letters such as . A statement built from smaller ones using connectives is called a compound proposition.
A connective joins propositions to make a new one. A truth table lists the truth value of the compound proposition for every possible choice of truth values of its parts. With variables the table has rows.
| Name | Symbol | Read as | True when |
|---|---|---|---|
| Negation | not | is false | |
| Conjunction | and | both are true | |
| Disjunction | or | at least one is true | |
| Exclusive or | xor | exactly one is true | |
| Implication | if then | not ( true and false) | |
| Biconditional | if and only if | both have the same value |
Truth table for the main connectives:
| T | T | T | T | F | T | T |
| T | F | F | T | T | F | F |
| F | T | F | T | T | T | F |
| F | F | F | F | F | T | T |
In , is the hypothesis and is the conclusion. An implication is false only when the hypothesis is true and the conclusion is false. If is false, the implication is true (it is true "by default").
Example. Build the truth table of .
| T | T | T | T | F | F |
| T | T | F | T | T | T |
| T | F | T | T | F | F |
| T | F | F | T | T | T |
| F | T | T | T | F | F |
| F | T | F | T | T | T |
| F | F | T | F | F | F |
| F | F | F | F | T | F |
Precedence order: first, then , then , then , then .