190 likes | 466 Vues
Circuit Design. Logical Equivalence. Two formulas are logically equivalent if their truth tables are identical Logically Equivalent forms can look very different ((p (q r)) (q p)) vs (p q) (p q r) ((p q)) (q r) vs (p q r) (p q r). Normal Forms.
E N D
Logical Equivalence • Two formulas are logically equivalent if their truth tables are identical • Logically Equivalent forms can look very different ((p (q r)) (q p)) vs (p q) (p q r) ((p q)) (q r) vs (p q r) (p q r)
Normal Forms • Disjunctive Normal Form • Sum-of-Products • Ex: (p q) (p q r) • Conjunctive Normal Form • Product-of-Sums • Ex: (p q r) (p q r)
Disjunctive Normal Form • Literal: variable or its negation • Term: conjunction of m literals • DNF: disjunction of n terms • Every formula is logically equivalent to a formula in DNF
Disjunctive Normal Form • To find DNF • Create truth table • For each line that is T, construct a term • Create disjunction of these terms • Example: ((p (q r)) (q p))
Conjunctive Normal Form • Literal: variable or its negation • Clause: disjunction of m literals • CNF: conjunction of n clauses • Every formula is logically equivalent to a formula in CNF
Conjunctive Normal Form • To find CNF • Create truth table • For each line that is F, construct term • Negate term using DeMorgan to get clause • Create conjunction of clauses • Example: ((p q)) (q r)
Logic Networks • Claude Shannon (1938) • Switches can be wired to produces signals 1 and 0 • Combine switches in the right way and you can produce circuits to represent logic formulas
Logic Gates • OR gate (+, ) • AND gate (, ) • INV gate ( )
Circuit Design Examples • Design a network for … (a b) c (ab) (ab) • Determine the function for the network. a b a c b c
More Circuit Design Examples • Design a network for … (a c) (b c) • Determine the function for the network. a b c
Circuit Design Examples • Create network for …
Minimization • What is minimum? • Usually involves # connections & # gates • How do we find? • Equivalence rules • Algorithmic
Two-level Minimization • Minimal DNF algorithm • Uses the equivalence rule: (ab) (ab) a • Examples: • (abc) (abc) (bc) • (abc) (abc) (ab) • (abc) (abc)
Quine McCluskey Alg. • Takes a formula written in canonical DNF and simplifies it using the equivalence rule • Produces a DNF formula with minimum number of terms
Practice Problems • Mathematical Structures • Section 7.2: 1(b), 3, 9, 16, 18 • Section 7.3: 20, 21