2 Chapter Objectives In this chapter you will be introduced to: Logic functions and circuitsBoolean algebra for dealing with logic circuitsLogic gates and synthesis of simple circuitsCAD tools and the VHDL hardware description language
3 Binary Switch x = x = 1 (a) Two states of a switch S x x=1(a) Two states of a switchSx(b) Symbol for a switch
4 Light Controlled by a Switch BatteryxLight(a) Simple connection to a batterySPowerxLightsupply(b) Using a ground connection as the return path
5 AND and OR Logic Functions Powerx1x2Lightsupply(a) The logical AND function (series connection)Sx1PowerLightsupplySx2(b) The logical OR function (parallel connection)
10 The Basic Gates × x x x x (a) AND gate x x + x x (b) OR gate x x 1x×xx122(a) AND gatex1x+xx122(b) OR gatexx(c) NOT gate
11 Inverter (NOT Circuit) Performs a basic logic function called inversion or complementationChanges one logic level (HIGH / LOW) to the opposite logic levelIn terms of bits, it changes a ‘1’ to a ‘0’ and vice versaINPUTOUTPUTAA’1
12 The AND Gate Composed of two or more inputs and a single output Performs logical multiplication.The logical operation of the AND gate is such that the output is HIGH (1) when all the inputs are HIGH, otherwise it is LOW (0)
13 The OR Gate Composed of two or more inputs and a single output Performs logical additionThe logical operation of the OR gate is such that the output is HIGH (1) when any of the inputs are HIGH, otherwise it is LOW (0)
16 Logic Network Example ® ® 1 ® 1 1 ® 1 ® ® x 1 A 1 ® 1 ® ® 1 f ® ® ® 1 1111x1A111f1B11x2(a) Network that implementsf=x+x×x112x12f,()(b) Truth tableA B1x1x121A1B1fTime(c) Timing diagram
17 Boolean AlgebraA mathematical system for formulating logical statements with symbols so that problems can be solved in a manner similar to ordinary algebra.Boolean algebra is the mathematics of digital systems.
19 Commutative Laws of Boolean Algebra The commutative law of addition for two variables is algebraically expressed as:x + y = y + xThe commutative law of multiplication for two variables is expressed as:xy = yxIn summary, the order in which the variables are ORed or ANDed make no difference.
20 Associative Laws of Boolean Algebra The associative law of addition of three variables is expressed as:x + (y + z) = (x + y) + zThe associative law of multiplication of three variables is expressed as:x(yz) = (xy)zIn summary, ORing or ANDing a grouping of variables produces the same result regardless of the grouping of the variables.
21 Distributive Law of Boolean Algebra The distributive law of three variables is expressed as follows:x (y+z) = xy + xzThis law states that ORing several variables and ANDing the result is equivalent of ANDing the single variable with each of the variables in the grouping, then ORing the result.
23 DualityTo reflect the principle of duality, the axioms and single-variable theorems are listed in pairs.For example, see 5a and 3a.When x =0, by 5a, the result is 0.When x =1, by 5a, the result is 0, which is also proved by 3a.
24 Two- and Three-Variable Properties PropertyBoolean Expression10 a. Commutative10 b. Commutativex * y = y *xx + y = y + x11 a. Associative11 b. Associativex * (y * z) = (x * y) * zx + (y + z) = (x + y) + z12 a. Distributive12 b. Distributivex * (y + z) = x * y + x * zx + (y * z) = (x + y) * (x + z)13 a. Absorption13 b. Absorptionx + x * y = xx * ( x + y) = x
25 Two- and Three-Variable Properties PropertyBoolean Expression14 a. Combining14 b. Combiningx * y + x * y’= x(x + y ) * ( x + y’) = x15 a. DeMorgan’s Theorem15 b. DeMorgan’s Theorem(x * y)’= (x’+ y’)(x + y)’= x’ * y’16 a.16 b.x + x’ * y = x + yx * (x’ + y) = x * y17 a. Consensus17 b. Consensusx * y + x’ * z + y * z = x * y + x’ * z(x + y ) * (x’ + z) * (y + z )= (x + y) * (x’+ z)
28 DeMorgan’s Theorem (A B)’ = A’ + B’ (1) (A + B)’ = A’ B’ (2) That is, the complement of the product is equivalent to the sum of the complements.This is true for any number of variables.(A B C … Z)’ = A’ + B’ + C’ + … + Z’(A + B)’ = A’ B’ (2)Similarly, the complement of the sum is equivalent to the product of the complements.Similarly, (A + B + C + …+ Z)’ = A’ * B’ * C’ * … * Z’
30 Methods to Complement a Function Interchange 1’s and 0’s for the values of F in the truth table.Use DeMorgan’s theorem on algebraic functionChange F to F’, and F’ to FChange OR to ANDChange AND to ORComplement each individual variableExample 1:F = AB+ C’D + B’DApplying DeMorgan’s theorem,F’ = (A’ + B’)(C + D’)(B + D’)
31 Methods to Complement a Function Example 2:Simplify F = (x1 + x3) . (x1’+ x3’)F = x1 x1’+ x1 x3’ + x3 x1’+ x3 x3’ (Distributive Property)x1 x1’ and x3 x3’ = 0 ( Identity 8)F = x1 x3’ + x1’ x3Example 3:F = x’yz + x’yz’ +xz= x’y(z + z’ ) + xz (Factoring out)= x’y .1 + xz ( By Identity 6)= x’y + xz ( By Identity 4)
32 Practice Problems Find the complement: (xyz)’ Expand: x + yz Simplify: x’y’ +x’y + xyx’y’ + xz + xy + yz’wy + w’yz’ + wxy + w’xy’
40 Two Implementations x x f (a) Canonical sum-of-products x f x 1x2f(a) Canonical sum-of-productsx1fx2(b) Minimal-cost realization
41 Terms and Definitions Synthesis Analysis The designing of a new system that implements a desired functional behavior.AnalysisThe task of determining the function performed by a system.
42 Terms and Definitions Sum-of-Products (SOP) Product-of-Sums (POS) Canonical SOPCanonical POSMintermA product term with all ‘n’ variables in asserted or negated form.MaxtermThe complement of a minterm
46 Practice Problems Show that the minimal Sum-of-Products is: f(x1, x2, x3) = x2’x3 + x1x3’Show that the minimal Product of Sums is:f(x1, x2, x3) = (x1 + x3)(x2’ + x3’)
47 Minimal Realizations f x (a) A minimal sum-of-products realization f x 123fx213(b) A minimal product-of-sums realization
48 More Practice Problems Determine the canonical Sum-of-Products expressions for the following functions:f(x1, x2, x3) = Σ m(2, 3, 4, 6, 7)f(x1, x2, x3, x4) = Σ m(3, 7, 9, 12, 13, 14, 15)Now determine the minimized SOPs for these two functions.Find the canonical Product of Sums expression for:f(x1, x2, x) = Π M(0, 1, 5)
49 Four More Logic GatesNANDNORExclusive OR (XOR)Exclusive NOR (XNOR)
50 The NAND GateThe NAND, which is composed of two or more inputs and a single output, is a very popular logic element because it may be used as a universal function.It may be employed to construct an inverter, an AND gate, an OR gate, or any combination of these functions.The term NAND is formed by the concatenation NOT-AND and implies an AND function with an inverted output.The logical operation of the NAND gate is such that the output is LOW (0) only when all the inputs are HIGH (1).
51 The NOR gateThe NOR gate, which is composed of two or more inputs and a single output, also has a universal property.The term NOR is formed by the concatenation NOT-OR and implies an OR function with an inverted output.The logical operation of the NOR gate is such that the output is HIGH (1) only when all the inputs are LOW.
52 The Exclusive-OR (XOR) and Exclusive NOR (XNOR) Gates These gates are usually formed from the combination of the other logic gates already discussed.Because of their functional importance, these gates are treated as basic gates with their own unique symbols.The Exclusive-OR is an "inequality" function and the output is HIGH (1) when the inputs are not equal to each other.The Exclusive-NOR is an "equality" function and the output is HIGH (0) when the inputs are equal to each other.
70 Example 2.10A circuit that controls a given digital system has three inputs: x1, x2, and x3.It has to recognize three different conditions:Condition A is true if x3 is true and either x1 is true or x2 is false.Condition B is true if x1 is true and either x2 or x3 is false.Condition C is true if x2 is true and either x1 is true or x3 is false.The control circuit must produce an output of 1 if at least two of the conditions A, B, and C are true.Design the simplest circuit that can be used for this purpose.
71 Solution to Example 2.10Using 1 for true and 0 for false, express the three conditions A, B, and C as:A = x3(x1 + x2’) = x3x1 + x3x2’B = x1(x2’ + x3’) = x1x2’ + x1x3’C = x2(x1 + x3’) = x2x1 + x2x3‘The desired output can be expressed as:f(x1, x2, x3) = AB + AC + BC
72 Solution to Example 2.10 Determine the product term AB: = (x3x1 + x3x2’)(x1x2’ + x1x3’)= x3x1x1x2’ + x3x1x1x3’ + x3x2’x1x2’ + x3x2’x1x3’= x3x1x2’ + O + x3x2’x1 + O= x1x2’x3Determine the product term AC = x1x2x3Determine the product term BC = x1x2x3’
73 Solution to Example 2.10 f(x1, x2, x3 ) = AB + AC + BC = x1x2’x3 + x1x2x3 + x1x2x3’= x1(x2’ + x2)x3 + x1x2(x3 + x3’)= x1x3 + x1x2=x1(x3 + x2)
74 Example 2.11Solve Example 2.10 using Venn Diagrams
75 Solution to Example 2.11 (a) Function A (b) Function B (c) Function C (d) Functionf