Discrete Maths
Discrete Maths
Chapter 2
M.Morris, M. (2014). Logic and Computer Design Fudamentals. 4th edition. Pearson
Education. USA.
ISBN 13: 978-1-292-02468-4
Chapter 1
2
Learning Objectives
On successful completion of this Course, students will be
able to:
4
Outline
8
Conjunction
Definition
If p and q are statementvariables, the conjunction of p
and q is "p and q" denoted p q.
12
Logical Equivalence
Definition
Two statement forms are called
logically equivalent If and only if,
they have identical truth values for
each possible substitution of
statements for their statement
variables. The logical equivalence
of statement forms P and Q is
denoted by writing P Q.
13
Example: Logical Equivalence
Distributivity: p (q r) (p q) (p r)
p q r q r p (q r) p q p r (p q) (p r)
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
14
Showing Nonequivalence
15
Tautology and Contradiction
Definition
A tautology is a statement
form that is always true.
A statement whose form is
a tautology is a tautological
statement.
17
Simplifying Statement
Forms
Example : Use Theorem 2.1.1 to verify the logical
equivalence
∼(∼p ∧ q) ∧ (p ∨ q) ≡ p.
Solution:
18
CONDITIONAL STATEMENTS
Conditional Statements
(Implication)
Definition
20
The Negation of a
Conditional Statement
Definition
Suppose a conditional statement of the form “If p
then q” is given.
1. The contrapositive is “If ~q then ~p” (~q → ~p)
2. The converse is “If q then p“ (q → p)
3. The inverse is "If ~p then ~q" (~p → ~q)
22
The Contrapositive, Converse and
Inverse of a Conditional Statement
Example :
23
The Contrapositive, Converse and
Inverse of a Conditional Statement
Solution
a. Contrapositive : If Howard cannot swim to the island, then
Howard cannot swim across the lake.
Converse: If Howard can swim to the island, then Howard
can swim across the lake.
Inverse: If Howard cannot swim across the lake, then
Howard cannot swim to the island.
b. Contrapositive : If tomorrow is not Monday, then today is
not Easter.
Converse: If tomorrow is Monday, then today is Easter.
a. Inverse: If today is not Easter, then tomorrow is not
24
Monday
Biconditional (Biimplication)
Definition
28
A Valid Argument Form
Show that the following argument form is valid
29
Rules of Inference
30
Application: A More
Complex Deduction
You are about to leave for school in the morning and discover
that you don’t have your glasses. This statements are true:
a. If I was reading the newspaper in the kitchen, then my glasses
are on the kitchen table.
b. If my glasses are on the kitchen table, then I saw them at
breakfast.
c. I did not see my glasses at breakfast.
d. I was reading the newspaper in the living room or I was reading
the newspaper in the kitchen.
e. If I was reading the newspaper in the living room then my
glasses are on the coffee table.
Where are the glasses? 31
Application: A More
Complex Deduction
Solution :
Let
RK = I was reading the newspaper in the kitchen.
GK = My glasses are on the kitchen table.
SB = I saw my glasses at breakfast.
RL = I was reading the newspaper in the living room.
GC = My glasses are on the coffee table.
32
The conclusion
1. RK → GK by (a)
GK → SB by (d)
∴ RK → SB by transitivity Thus the glasses are
2. RK → SB by the conclusion of (1) on the coffee table.
∼SB by (c)
∴ ∼RK by modus tollens
3. RL ∨ RK by (d)
∼RK by the conclusion of (2)
∴ RL by elimination
4. RL → GC by (e)
RL by the conclusion of (3)
33
∴ GC by modus ponens
Exercises
Use symbols to write the logical form of each argument and
then use a truth table to test the argument for validity.
37
Black Boxes and Gates
38
“NOT”, “AND”, and “OR” Gates
39
NAND and NOR Gates
40
Combinatorial Circuits
41
Finding a Boolean
Expression for a Circuit
Find the Boolean expressions that correspond to the
circuits shown below :
Solution :
The final expression obtained, (P ∨ Q)∧ ∼(P ∧ Q), is
the expression for exclusive or: P or Q but not both.
42
Example 1: Boolean Expression
AB
=AB+C+D
C+D
43
Example 2: Boolean Expression
A’
AB A’+ABCD
ABCD
CD
44
Example 3: Boolean Expression
AB
AB+B’
B’
(AB+B’)BC
BC
45
Example 4: Boolean Expression
A’
A’+AB
AB
A’+AB+B’(C+D)
B’
B’(C+D)
C+D
46
Recognizer
Definition
A recognizer is a circuit that outputs a 1 for exactly one
particular combination of input signals and outputs 0’s
for all other combinations.
47
Constructing Circuits for
Boolean Expressions
Construct circuits for the following Boolean expressions
Solution :
a multiple-input AND-gate
48
The Circuit Corresponding
to a Boolean Expression
49
The Circuit Corresponding
to a Boolean Expression
50
Designing a Circuit for a
Given Input/Output Table
Design a circuit for the following input/output table:
Solution :
(P ∧ Q ∧ R) ∨ (P∧ ∼Q ∧ R) ∨ (P∧ ∼Q∧ ∼R).
51
Disjunctive Normal Form
(DNF)
Definition
Disjunctive Normal Form (DNF) is a boolean expression E,
which has no duplication on the multiplication of each
variable
Example
E1 = X Z’ + X’ Y Z’ + X Y’ Z is DNF
Example:
E = X Y 'Z + X' Y Z + X Y Z ‘
Example
1.Let P1 = xy’zp and P2 = xyt, then consensus of P1 and
P2 is Q = xzpt
2.Let P1 = xy’z and P2 = x’yzp, then P1 and P2 don’t
have consensus because P1 and P2 have two
complement variable, they are x and y. 54
Theorem of Fundamental
Product
Theorem (Include)
If fundamental product P2 including fundamental product
P1, then
P1+P2=P1
Example :
xz xyz xz
55
KARNAUGH MAP
Karnaugh Map
57
Karnaugh Map
Two Variables
Let (x,y,) be a sum of product Boolean expression such
that minterm consists of three variables x,y. To define
the K-map for (x,y) , we consider the following
examples.
Example:
The left picture is the K-map corresponding to the
(x,y) = xy + x’y + x’y’
The left picture is the K-map corresponding to the
(x,y) = x’y + xy’
58
Karnaugh Map
59
Karnaugh Map
60
Literal Karnaugh Map
1. Pairs
or
61
Literal Karnaugh Map
2. Horizontal Quads
62
Literal Karnaugh Map
3. Vertical Quads
63
Literal Karnaugh Map
4. Octets (1/2)
64
Literal Karnaugh Map
4. Octets (2/2)
Karnaugh map in slide before same as following Karnaugh
Map
65
Literal Karnaugh Map
5. Overlapping
isolated
redudant
68
Thank You