890 likes | 1.48k Views
Digital Design: Principles and Practices. Chapter 4 Combinational Logic Design Principles. Introduction. Combinational Logic Circuit Outputs depend only on current inputs Example: The rotary channel selector knob on an old-fashioned TV Sequential Logic Circuit
E N D
Digital Design:Principles and Practices Chapter 4 Combinational Logic Design Principles
Introduction • Combinational Logic Circuit • Outputs depend only on current inputs • Example: The rotary channel selector knob on an old-fashioned TV • Sequential Logic Circuit • Outputs depend on current inputs and on past inputs • Feedback loop • Example: The channel selector controlled by the up and down pushbuttons on a TV remote control
Introduction (cont’d) • Analysis • Logic diagram Formal description of the function • Synthesis • Formal description Logic diagram • Combinational circuits may have one or more outputs. • In this chapter, we focus on single-output circuits.
Boolean Algebra • Invented by English mathematician George Boole in 1854 • Two-valued algebraic system • 0 or 1 (LOW or HIGH) • Symbolic variables (such as W, X, Y, and Z) are used • The opposite (or complement) of an input signal level • We use a prime (’) to denote an inverter’s function • Logic multiplication • Logical AND: (.) • Logical addition • Logical OR: ( + )
Axiom • The axioms (or postulates) of a mathematical system are a minimal set of basic definitions that we assume to be true, from which all other information about the system can be derived.
Axiom (cont’d) • An axiom is any mathematical statement that serves as a starting point from which other statements are logically derived. Unlike theorems, axioms (unless redundant) cannot be derived by principles of deduction, nor are they demonstrable by mathematical proofs, simply because they are starting points; there is nothing else from which they logically follow (otherwise they would be classified as theorems). (Source: http://en.wikipedia.org/wiki/Axiom)
Perfect Induction • To prove theorem T1 ( X + 0 = X ): • [X = 0] 0 + 0 = 0 (true, according to axiom A4’) • [X = 1] 1 + 0 = 1 (true, according to axiom A5’)
Proofs • Theorem T9 • Theorem T11 • Replace each variable with an arbitrary logic expression: • (X + Y’) + Z’ = X + (Y’ + Z’) (based on T7) • (V’ + X).(W.(Y’ + Z)) + (V’+X).(W.(Y’+Z))’ = V’ + X(based on T10)
DeMorgan’s Theorems • Theorem T13
DeMorgan’s Theorems • Theorem T13’
DeMorgan’s Theorems – An Example • F(W, X, Y, Z) = (W’.X) + (X.Y) + (W.(X’ + Z’)) • Prove that: [F(W, X, Y, Z)]’ = (W + X’).(X’ + Y’).(W’ + (X.Z))
Duality • The primed version of each axiom (e.g., A5’) is obtained from the unprimed version (e.g., A5) by simply swapping 0 and 1 and, if present, “.” and “ + ”. • Metatheorem • A metatheorem is a theorem about theorems. • Principle of Duality Any theorem or identity in switching algebra remains true if 0 and 1 are swapped and “.”and “+” are swapped throughout.
Operator Precedence • Logic AND (.) has higher precedence than Logic OR ( + ). • Apply Principle of Duality on Theorem T9 • X + X.Y = X [T9] X + (X.Y) = X X.(X + Y) = X [T9’]
Truth Table • The truth table for an n-variable logic function has 2n rows.
Definitions • Literal • Product term • Sum-of-products (SOP) expression • Sum term • Product-of-sums (POS) expressions • Normal term • Minterm • Maxterm
Literal • A literal is a variable or the complement of a variable. • Examples: • X • Y • X’ • Y’
Product Term • A product term is a single literal or a logical product (‘.’) of two or more literals. • Examples: • Z’ • W.X.Y • X.Y’.Z • W’.Y’.Z
Sum-of-Products (SOP) Expression • A sum-of-products expression is a logical sum of product terms. • Examples: • Z’ + W.X.Y + X.Y’.Z + W’.Y’.Z
Sum Term • A sum term is a single literal or a logical sum of two or more literals. • Examples: • Z’ • W + X + Y • X + Y’ + Z • W’ + Y’ + Z
Product-of-Sums (POS) Expression • A product-of-sums expression is a logical product of sum terms. • Examples: • Z’.(W + X + Y).(X + Y’ + Z).(W’ + Y’ + Z)
Normal Term • A normal term is a product or sum term in which no variable appears more than once. • Examples of non-normal terms: • W.X.X.Y’ • W + W + X’ + Y • Examples of normal terms: • W.X.Y’ • W + X’ + Y
Minterm • An n-variable minterm is a normal product term with n literals. • Examples (4-variable minterms): • W’.X’.Y’.Z’ • W.X.Y’.Z • W’.X’.Y.Z’
Maxterm • An n-variable maxterm is a normal sum term with n literals. • Examples (4-variable maxterms): • W’ + X’ + Y’ + Z’ • W + X’ + Y’ + Z • W’ + X’ + Y + Z’
Canonical Sum • The canonical sum of a logic function is a sum of minterms corresponding to truth-table rows (input combinations) for which the function produces a logic ‘1’ output. • Table 4-5: F = X’.Y’.Z’ + X’.Y.Z + X.Y’.Z’ + X.Y.Z’ + X.Y.Z
Minterm List (Σ notation) • Table 4-5: F = ΣX,Y,Z(0,3,4,6,7)
Canonical Product • The canonical product of a logic function is a product of the maxterms corresponding to input combinations for which the function produces a logic ‘0’ output. • Table 4-5: F = (X + Y + Z’).(X + Y’ + Z).(X’ + Y + Z’)
Maxterm List (Π notation) • Table 4-5: F = ΠX,Y,Z(1,2,5)
We Have Learned … • Five possible representations for a combinational logic function: • Truth Table • Canonical sum (a type of SOP expression) • Minterm list (Σnotation) • Canonical product (a type of POS expression) • Maxterm list (Πnotation)
A 3-Input, 1-Output Logic Circuit(cont’d) F = ( (X + Y’).Z) + (X’.Y.Z’) = X.Z + Y’.Z + X’.Y.Z’
A 3-Input, 1-Output Logic Circuit(cont’d) F = ( (X + Y’).Z) + (X’.Y.Z’) = X.Z + Y’.Z + X’.Y.Z’
A 3-Input, 1-Output Logic Circuit(cont’d) F = ( (X + Y’).Z) + (X’.Y.Z’) = X.Z + Y’.Z + X’.Y.Z’ = (X + Y’ + Z’).(X’ + Z).(Y + Z)
Combinational Circuit Synthesis • Hardware Description Language (HDL) • Verilog, VHDL • Circuit synthesis software (automatic circuit synthesis) • Target Devices • FPGA • ASIC cell library • Circuit synthesis by hand
A 4-bit Prime-Number Detector • Given a 4-bit input combination N = N3N2N1N0, produce a 1 (HIGH) output for N = 1, 2, 3, 5, 7, 11, 13, and 0 (LOW) otherwise. • Answer: F = ΣN3,N2,N1,N0(1, 2, 3, 5, 7, 11, 13) = N3’.N2’.N1’.N0 + N3’.N2’.N1.N0’ + N3’.N2’.N1.N0 + N3’.N2.N1’.N0 + N3’.N2.N1.N0 + N3.N2’.N1.N0 + N3.N2.N1’.N0
Circuit Manipulations • Any sum-of-produces (SOP) expression can be realized as: • An AND-OR circuit; or • A NAND-NADN circuit • Any product-of-sums (POS) expression can be realized as: • An OR-AND circuit; or • A NOR-NOR circuit • In most logic technologies, inverting gates (like NAND and NOR) are faster than noninverting gates like AND and OR.