Combinational Logic 1 Topics Basics of digital logic
Combinational Logic 1
Topics • Basics of digital logic • Basic functions ♦ Boolean algebra ♦ Gates to implement Boolean functions • Identities and Simplification 2
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 3
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 4
OR Operator • Symbol is + ♦ Not addition ♦ Z=X+Y • Truth table -> • Z is 1 if either 1 ♦ Or both! 5
NOT Operator • Unary • Symbol is bar (or ’) ♦ Z = X’ • Truth table -> • Inversion 6
Gates • Circuit diagrams are traditionally used to document circuits • Remember that 0 and 1 are represented by voltages 7
AND Gate Timing Diagrams 8
OR Gate 9
Inverter 10
More Inputs • Work same way • What’s output? 11
Digital Circuit Representation: Schematic 12
Digital Circuit Representation: Boolean Algebra • For now equations with operators AND, OR, and NOT • Can evaluate terms, then final OR • Alternate representations next 13
Digital Circuit Representation: Truth Table • 2 n rows where n # of variables 14
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 15
Identities • Use identities to manipulate functions • On previous slide, I used distributive law to transform from to 16
Table of Identities 17
Duals • Left and right columns are duals • Replace AND with OR, 0 s with 1 s 18
Single Variable Identities 19
Commutative • Order independent 20
Associative • Independent of order in which we group • So can also be written as and 21
Distributive • Can substitute arbitrarily large algebraic expressions for the variables 22
De. Morgan’s Theorem • Used a lot • NOR equals invert AND • NAND equals invert OR 23
Truth Tables for De. Morgan’s 24
Algebraic Manipulation • Consider function 25
Simplify Function Apply 26
Fewer Gates 27
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! 28
Complement of a Function • Definition: 1 s & 0 s swapped in truth table 29
Truth Table of the Complement of a Function X Y Z F = X + Y ’Z 0 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 F’ 30
Algebraic Form for Complement • Mechanical way to derive algebraic form for the complement of a function 1. Take the dual • Recall: Interchange AND & OR, and 1 s & 0 s 2. Complement each literal (a literal is a variable complemented or not; e. g. x , x’ , y, y’ each is a literal) 31
Example: Algebraic form for the complement of a function F = X + Y’Z • To get the complement F’ 1. Take dual of right hand side X. (Y’ + Z) 2. Complement each literal: X’. (Y + Z’) F’ = X’. (Y + Z’) 32
Mechanically Go From Truth Table to Function
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 34
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 35
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 36
Definition: Minterm (continued) Min Term Each minterm represents exactly one combination of the binary variables in a truth table. 37
Truth Tables of Minterms 38
Number of Minterms • For n variables, there will be 2 n minterms • Minterms are labeled from minterm 0, to minterm 2 n-1 ♦ m 0 , m 1 , m 2 , … , m 2 n-2 , m 2 n-1 • For n = 3, we have ♦ m 0 , m 1 , m 2 , m 3 , m 4 , m 5 , m 6 , m 7 39
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’ 40
Definition: Maxterms (continued) Maxterm mmmmmmmmmmmmmmmmmmmm mmmmmmmmmm, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx , mmmmmmmmmmmmmmmmmmmm 41
Truth Tables of Maxterms 42
Minterm related to Maxterm • Minterms and maxterms with same subscripts are complements • Example 43
Standard Form of F: Sum of Minterms • OR all of the minterms of truth table for which the function value is 1 • F = m 0 + m 2 + m 5 + m 7 44
Complement of F • Not surprisingly, just sum of the other minterms • In this case F’ = m 1 + m 3 + m 4 + m 6 45
Product of Maxterms • Recall that maxterm is true except for its own row • So M 1 is only false for 001 46
Product of Maxterms • F = m 0 + m 2 + m 5 + m 7 • Remember: ♦ ♦ M 1 is only false for 001 M 3 is only false for 011 M 4 is only false for 100 M 6 is only false for 110 • Can express F as AND of M 1, M 3, M 4, M 6 or 47
Recap • Working (so far) with AND, OR, and NOT • Algebraic identities • Algebraic simplification • Minterms and maxterms • Can now synthesize function from truth table 48
- Slides: 48