Digital Design 2. Logic Gates and oolean lgebra József Sütő ssistant Lecturer References: [1] D.M. Harris, S.L. Harris, Digital Design and Computer rchitecture, 2nd ed., Elsevier, 213. [2] T.L. Floyd, Digital Fundamentals, 11th ed., Global Edition, Pearson, 215.
Logic Gates Perform logic functions: inversion (NOT), ND, OR, NND, NOR, etc. Single-input: NOT gate, buffer Two-input: ND, OR, XOR, NND, NOR, XNOR Multiple-input
Single-input Logic Gates NOT UF = 1 1 = 1 1
Two-Input Logic Gates ND OR = 1 1 1 1 1 = + 1 1 1 1 1 1 1
Two-Input Logic Gates XOR NND NOR XNOR = + = = + = + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Multiple-Input Logic Gates C NOR3 C ND3 = ++C = C 1 1 1 1 C 1 1 1 1 1 1 1 1 1 1 1 1 1 C 1 1 1 1 1 1 1 1 1
Logic Gates Exercise1: If a LOW is applied to point, determine the net output at points E and F LOW HIGH Exercise2: Determine the truth table to circuit which can be seen below
Logic Gates Exercise1: Sensors are used to monitor the pressure and the temperature of a chemical liquid stored in a vat. The circuit for each sensor produces a HIGH voltage when a specified maximum value is exceeded. n alarm requiring a LOW voltage input must be activated when either the pressure or the temperature is excessive. Design a circuit for this application - NOR Exercise2: In a certain automated manufacturing process, electrical components are automatically inserted in a PC. efore the insertion tool is activated, the PC must be properly positioned, and the component to be inserted must be in the chamber. Each of these prerequisite conditions is indicated by a HIGH voltage. The insertion tool requires a LOW voltage to activate it. Design a circuit to implement this process - NND
Logic Levels Noise - anything that degrades the signal E.g., resistance, power supply noise, interference between neighboring wires, etc. Example: a gate (driver) outputs 5 V but, because of resistance in a long wire, receiver gets 4.5 V Driver Noise Receiver 5 V 4.5 V
Noise Margins Driver Receiver Logic High Output Range V O H Output Characteristics V DD NM H Input Characteristics Logic High Input Range Forbidden Zone V IH V IL Logic Low Output Range V O L NM L GND NM H = V OH V IH NM L = V IL V OL Logic Low Input Range
Logic Levels Exercise: Consider the inverter circuit below. VO1 is the output voltage of inverter I1, and VI2 is the input voltage of inverter I2. oth inverters have the following characteristics: VDD = 5 V VIL = 1.35 V VIH = 3.15 V VOL =.33 V VOH = 3.84 V What are the inverter low and high noise margins? 1.2V and.69v Can the circuit tolerate 1 V of noise between VO1 and VI2? only when the input is LOW
Types of Logical Circuits Combinational Logic Memoryless Outputs determined by current values of inputs The functional specification of a combinational circuit is usually expressed as a truth table of a oolean equation! Sequential Logic Has memory Outputs determined by previous and current values of inputs inputs functional spec timing spec outputs
oolean Equations Functional specification of outputs in terms of inputs Example: S = F(,, C in ) C out = F(,, C in ) S C L C C out in S = C in C out = + C in + C in
Definitions Complement: variable with a bar over it,, C Literal: variable or its complement,,,, C, C Implicant: product of literals C, C, C Minterm: product that includes all input variables C, C, C Maxterm: sum that includes all input variables (++C), (++C), (++C)
Sum of Products (SOP) Form ll equations can be written in SOP form Each row has a minterm minterm is a product (ND) of literals Each minterm is TRUE for that row (and only that row) Form function by ORing minterms where the output is TRUE Thus, a sum (OR) of products (ND terms) 1 1 1 1 1 1 minterm minterm name m m 1 m 2 m 3 = F(, ) = + = Σ(1, 3)
Product of Sums (POS) Form ll oolean equations can be written in POS form Each row has a maxterm maxterm is a sum (OR) of literals Each maxterm is FLSE for that row (and only that row) Form function by NDing the maxterms for which the output is FLSE Thus, a product (ND) of sums (OR terms) 1 1 1 1 1 1 maxterm + + + + maxterm name M M 1 M 2 M 3 = F(, ) = ( + )( + ) = Π(, 2)
SOP and POS Forms Example ou are going to the cafeteria for lunch ou won t eat lunch (E) If it s not open (O) or If they only serve cornflakes (C) Write a truth table for determining if you will eat lunch (E). O C E 1 1 1 1 1
SOP and POS Form Example SOP sum-of-products O C E 1 1 1 1 1 minterm O C O C O C O C E = OC = Σ(2) POS product-of-sums O C E 1 1 1 1 1 maxterm O + C O + C O + C O + C E = (O + C)(O + C)(O + C) = Π(, 1, 3)
SOP and POS Form Example Exercise: Determine the SOP and POS forms to the following truth table. SOP X = C + C + C + C POS X = (++C)(++C)(++C)(++C)
Standard SOP Expression The domain of a general oolean expression is the set of variables contained in the expression in either complemented or uncomplemented form (literals). Example: the domain of + C,, C standard SOP expression is one in which all the variables in the domain appear in each product term in the expression. Standard SOP expressions can be important in constructing truth tables and in the Karnaugh map simplification
Converting Nonstandard SOP to Standard Steps: 1. Multiply each nonstandard product term by a term made up of the sum of a missing variable and its complement ( + = 1). This results two product terms. s you know, you can multiply anything by 1 without changing its value 2. Repeat Step 1 until all resulting product terms contain all variables in the domain in either complemented or uncomplemented form. In converting a product term to standard form, the number of product terms is doubled for each missing variable Example: SOP: C + + CD Std. SOP: CD + CD + CD + CD + CD + CD + CD
Standard SOP Exercise: Develop a truth table to the following standard SOP expression: X = C + C + C
oolean lgebra xioms and theorems to simplify oolean equations Like regular algebra, but simpler: variables have only two values (1 or ) Duality in axioms and theorems: NDs and ORs, s and 1 s interchanged
Theorems of One Variable 1 = Wires = = = 1 = 1 = 1 = + = = + 1 = 1 = + = = = 1 = = = + = 1
Theorems of Several Variables Note: T8 differs from traditional algebra: OR (+) distributes over ND ( )
Simplifying oolean Equations Example 1: = + = ( + ) T8 = (1) T5 = T1 Example 2: = ( + C) = ((1 + C)) T8 = ((1)) T2 = () T1 = () T7 = T3
DeMorgan s Theorems = = + ubble pushing! = + =
DeMorgan s Theorems Exercise: pply DeMorgan s theorems to the following expressions while it is possible: ( + + C)D C + D C + DEF ( + + C )(D + E + F) + CD + EF ( + )(C + D)(E + F)
oolean Expression for a Logic Circuit What is the oolean expression for the following circuits? C D C D =()(CD) = (( + )C)D
Logic Simplification with oolean lgebra Using oolean algebra techniques, simplify the following expression: + ( + C) + ( + C) 1. + + C + + C 2. + + C + + C 3. + C + + C 4. + C + 5. + C
Logic Simplification with oolean lgebra Using oolean algebra techniques, simplify the following expression: ( (C + D) + )C 1. (C + D + )C 2. (C + D + )C 3. (C + )C 4. CC + C 5. C + C 6. C( + ) 7. C1 8. C
Logic Simplification with oolean lgebra Using oolean algebra techniques, simplify the following expression: + C + C 1. () (C) + C 2. ( + )( + C) + C 3. + C + + C + C 4. + C + + C 5. + + C 6. + C
End!