Digital Circuit And Logic Design I Lecture 3
Outline Combinational Logic Design Principles (). Introduction 2. Switching algebra 3. Combinational-circuit analysis 4. Combinational-circuit synthesis Panupong Sornkhom, 25/2 2
Combinational Logic Design Principles ()
. Introduction Logic circuits are classified into two types Combinational circuits outputs depend only on its current inputs Sequential circuits outputs depend not only on its current inputs but also on its current state. Combinational-circuit analysis Logic diagram formal description (truth table or logic expression) Combinational-circuit synthesis Formal description logic diagram Panupong Sornkhom, 25/2 4
. Introduction (cont.) Combinational-circuit design Requirements Informal description Informal description formal description Formal description logic diagram Panupong Sornkhom, 25/2 5
2. Switching algebra In 854, George Boole invented a two-value algebraic system, now called Boolean algebra In 938, Claude E. Shannon showed how to adapt Boolean algebra to analyze and describe the behavior of circuits built from relays Axioms (A) X = if X (A ) X = if X (A2) If X =, then X = (A2 ) If X =, then X = (A3) = (A3 ) + = (A4) = (A4 ) + = (A5) = = (A5 ) + = + = Panupong Sornkhom, 25/2 6
2. Switching algebra (cont.) Single-Variable Theorems (T) X+ = X (T ) X = X (Identities) (T2) X+ = (T2 ) X = (Null elements) (T3) X+X = X (T3 ) X X = X (Idempotency) (T4) (X ) = X (Involution) (T5) X+X = (T5 ) X X = (Complements) Two- and Three-Variable Theorems (T6) X+Y = Y+X (T6 ) X Y = Y X (Commutativity) (T7) (X+Y)+Z = X+(Y+Z) (T7 ) (X Y) Z = X (Y Z) (Associativity) (T8) X Y+X Z = X (Y+Z) (T8 ) (X+Y) (X+Z) = X+Y Z (Distributivity) Panupong Sornkhom, 25/2 7
2. Switching algebra (cont.) Two- and Three-Variable Theorems (cont.) (T9) X+X Y = X (T9 ) X (X+Y) = X (Covering) (T) X Y+ X Y = X (T ) (X+Y) (X+Y ) = X (Combining) (T) X Y+X Z+Y Z = X Y+X Z (T ) (X+Y) (X +Z) (Y+Z)= (X+Y) (X +Z) (Consensus) n-variable Theorems (T2) X+X+ +X = X (T2 ) X X X = X (Generalized idempotency) (T3) (X X 2 X n ) = X +X 2 + +X n (T3 ) (X +X 2 + +X n ) = X X 2 X n (DeMorgan s theorems) Panupong Sornkhom, 25/2 8
2. Switching algebra (cont.) Principle of Duality If a Boolean statement is proved true, the dual of statement is also true. The dual of expression is obtained by replacing each + in the expression by and vice versa, and replacing by and vice versa. Notice that we must preserving the existence of all parentheses, whether present or implied For example, given X Y+X Z = X (Y+Z) its dual is (X+Y) (X+Z) = X +(Y Z) Panupong Sornkhom, 25/2 9
2. Switching algebra (cont.) Standard representations of logic functions Truth table An algebraic sum of minterms, the canonical sum A minterm list using the Σ notation An algebraic product of maxterms, the canonical product A maxterm list using the Π notation Panupong Sornkhom, 25/2
Panupong Sornkhom, 25/2 2. Switching algebra (cont.) Standard representations of logic functions (cont.) 6 7 5 4 3 2 F Z Y X Row Truth table for a particular 3-variable logic function, F(X,Y,Z)
2. Switching algebra (cont.) Standard representations of logic functions (cont.) A literal is a variable or the complement of a variable. A product term is a single literal or a logical product of two or more literals. A sum-of-products expression is a logical sum of product terms A sum term is a single literal or a logical sum of two or more literals A product-of-sums expression is a logical product of sum terms A normal term is a product or sum term in which no variable appears more than once. An n-variable minterm is a normal product term with n literals. An n-variable maxterm is a normal sum term with n literals Panupong Sornkhom, 25/2 2
2. Switching algebra (cont.) Standard representations of logic functions (cont.) There is a close correspondence between the truth table and minterms and maxterms. A minterm can be defined as a product term that is in exactly one row of the truth table. A maxterm can be defined as a sum term that is in exactly one row of the truth table. Picture from Textbook DDPP Panupong Sornkhom, 25/2 3
2. Switching algebra (cont.) Standard representations of logic functions (cont.) Based on the correspondence between the truth table and minterms, we can create an algebraic representation of a logic function from its truth table The canonical sum of a logic function is a sum of the minterms corresponding to truth-table rows (input combinations) for which the function produce a output. The cannonical product of a logic function is a product of the maxterms corresponding to input combinations for which the function produces a output. Panupong Sornkhom, 25/2 4
2. Switching algebra (cont.) Standard representations of logic functions (cont.) F=Σ X,Y,Z (,3,4,6,7) =X Y Z + X Y Z+ X Y Z + X Y Z +X Y Z Panupong Sornkhom, 25/2 5
2. Switching algebra (cont.) Standard representations of logic functions (cont.) F=Π X,Y,Z (,2,5) =(X+Y+Z ) (X+Y +Z) (X +Y+Z ) Panupong Sornkhom, 25/2 6
2. Switching algebra (cont.) Standard representations of logic functions (cont.) Therefore, Σ X,Y,Z (,3,4,6,7) = Π X,Y,Z (,2,5) In fact, for any logic function F, minterm list is complement of maxterm list and vice versa Panupong Sornkhom, 25/2 7
Panupong Sornkhom, 25/2 8 3. Combinational-Circuit Analysis 7 6 5 4 3 2 F Z Y X Row Pictures from text book DDPP Exhaustive approach
3. Combinational-Circuit Analysis (cont.) Algebraic approach F = ((X+Y ) Z)+(X Y Z ) Pictures from text book DDPP Panupong Sornkhom, 25/2 9
3. Combinational-Circuit Analysis (cont.) From F = ((X+Y ) Z)+(X Y Z ) We can use theorems to transform this expression into another form F = X Z+Y Z+X Y Z (sum of product form) Or F = ((X+Y ) Z)+(X Y Z ) = ((X+Y )+X Y Z ) (Z+X Y Z ) = ((X+Y )+X ) ((X+Y )+Y) ((X+Y )+Z ) (Z+X ) (Z+Y) (Z+Z ) = (X+Y +Z ) (X +Z) (Y+Z) = (X+Y +Z ) (X +Z) (Y+Z) (product of sum form) Panupong Sornkhom, 25/2 2
4. Combinational-Circuit Synthesis Circuit description and designs Given a circuit description, we convert it to formal description From formal description, we can derive it to logic diagram For example The description of a 4-bit prime-number detector might be, Given a 4-bit input combination N = N 3 N 2 N N, this function produces a output for N =, 2, 3, 5, 7,, 3, and otherwise. A formal description (logic function) can be designed directly from the canonical sum of product expression F = Σ N3N2NN (, 2, 3, 5, 7,, 3) = N 3 N 2 N N + N 3 N 2 N N + N 3 N 2 N N + N 3 N 2 N N + N 3 N 2 N N + N 3 N 2 N N + N 3 N 2 N N Panupong Sornkhom, 25/2 2
4. Combinational-Circuit Synthesis (cont.) Canonical-sum design for 4-bit prime-number detector Picture from text book DDPP Panupong Sornkhom, 25/2 22
4. Combinational-Circuit Synthesis (cont.) Circuit manipulations Sometimes we would like to use NAND and NOR gates instead of use AND, OR, and NOT gates Because NANDs and NORs are faster than ANDs and ORs in most technologies We can translate any logic expression into an equivalent sum-ofproducts expression, such an expression may be realized directly with two-level AND-OR circuit or may be converted to two-level NAND-NAND circuit Similarly, we can translate any logic expression into an equivalent product-of-sums expression, such an expression may be realized directly with two-level OR-AND circuit or may be converted to twolevel NOR-NOR circuit Panupong Sornkhom, 25/2 23
4. Combinational-Circuit Synthesis (cont.) Pictures from text book DDPP Panupong Sornkhom, 25/2 24
4. Combinational-Circuit Synthesis (cont.) Pictures from text book DDPP Panupong Sornkhom, 25/2 25
4. Combinational-Circuit Synthesis (cont.) Pictures from text book DDPP Panupong Sornkhom, 25/2 26