480 likes | 617 Views
Combinational Logic 1. Topics. Basics of digital logic Basic functions Boolean algebra Gates to implement Boolean functions Identities and Simplification. Binary Logic. Binary variables Can be 0 or 1 (T or F, low or high) Variables named with single letters in examples
E N D
Topics • Basics of digital logic • Basic functions • Boolean algebra • Gates to implement Boolean functions • Identities and Simplification
Binary Logic • Binary variables • Can be 0 or 1 (T or F, low or high) • Variables named with single letters in examples • Use words when designing circuits • Basic Functions • AND • OR • NOT
AND Operator • Symbol is dot • Z = X · Y • Or no symbol • Z = XY • Truth table -> • Z is 1 only if • Both X and Y are 1
OR Operator • Symbol is + • Not addition • Z = X + Y • Truth table -> • Z is 1 if either 1 • Or both!
NOT Operator • Unary • Symbol is bar (or ’) • Z = X’ • Truth table -> • Inversion
Gates • Circuit diagrams are traditionally used to document circuits • Remember that 0 and 1 are represented by voltages
AND Gate Timing Diagrams
More Inputs • Work same way • What’s output?
Digital Circuit Representation: Boolean Algebra • For now equations with operators AND, OR, and NOT • Can evaluate terms, then final OR • Alternate representations next
Digital Circuit Representation: Truth Table • 2n rows where n # of variables
Functions • Can get same truth table with different functions • Usually want simplest function • Fewest gates or using particular types of gates • More on this later
Identities • Use identities to manipulate functions • On previous slide, I used distributive law to transform from to
Duals • Left and right columns are duals • Replace AND with OR, 0s with 1s
Commutative • Order independent
Associative • Independent of order in which we group • So can also be written as and
Distributive • Can substitute arbitrarily large algebraic expressions for the variables
DeMorgan’s Theorem • Used a lot • NOR equals invert AND • NAND equals invert OR
Algebraic Manipulation • Consider function
Simplify Function Apply Apply Apply
Consensus Theorem • The third term is redundant • Can just drop • Proof in book, but in summary • For third term to be true, Y & Z both 1 • Then one of the first two terms must be 1!
Complement of a Function • Definition: 1s & 0s swapped in truth table
Algebraic Form for Complement • Mechanical way to derive algebraic form for the complement of a function • Take the dual • Recall: Interchange AND & OR, and 1s & 0s • Complement each literal (a literal is a variable complemented or not; e.g. x , x’ , y, y’ each is a literal)
Example: Algebraic form for the complement of a function F = X + Y’Z • To get the complement F’ • Take dual of right hand side X . (Y’ + Z) • Complement each literal: X’ . (Y + Z’) F’ = X’ . (Y + Z’)
From Truth Table to Function • Consider a truth table • Can implement F by taking OR of all terms that correspond to rows for which F is 1 • “Standard Form” of the function
Standard Forms • Not necessarily simplest F • But it’s mechanical way to go from truth table to function • Definitions: • Product terms – AND ĀBZ • Sum terms – OR X + Ā • This is logical product and sum, not arithmetic
Definition: Minterm • Product term in which all variables appear once (complemented or not) • For the variables X, Y and Z example minterms : X’Y’Z’, X’Y’Z, X’YZ’, …., XYZ
Min Term Definition: Minterm (continued) Each minterm represents exactly one combination of the binary variables in a truth table.
Number of Minterms • For n variables, there will be 2n minterms • Minterms are labeled from minterm 0, to minterm 2n-1 • m0 , m1 , m2 , … , m2n-2 , m2n-1 • For n = 3, we have • m0 , m1 , m2 , m3 , m4 , m5 , m6 , m7
Definition: Maxterm • Sum term in which all variables appear once (complemented or not) • For the variables X, Y and Z the maxterms are: X+Y+Z , X+Y+Z’ …. , X’+Y’+Z’
mmmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmm,m xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,mmmmmmmmmmmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmmmm Maxterm Definition: Maxterms (continued)
Minterm related to Maxterm • Minterms and maxterms with same subscripts are complements • Example
Standard Form of F:Sum of Minterms • OR all of the minterms of truth table for which the function value is 1 • F = m0 + m2 + m5 + m7
Complement of F • Not surprisingly, just sum of the other minterms • In this case F’ = m1 + m3 + m4 + m6
Product of Maxterms • Recall that maxterm is true except for its own row • So M1 is only false for 001
Product of Maxterms • F = m0 + m2 + m5 + m7 • Remember: • M1 is only false for 001 • M3 is only false for 011 • M4 is only false for 100 • M6 is only false for 110 • Can express F as AND of M1, M3, M4, M6 • or
Recap • Working (so far) with AND, OR, and NOT • Algebraic identities • Algebraic simplification • Minterms and maxterms • Can now synthesize function from truth table