Download presentation

Presentation is loading. Please wait.

Published byGeorgia Carter Modified over 4 years ago

1
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub

2
2 Binary Logic and Gates Binary variables take on one of two values. Logical operators operate on binary values and binary variables. Basic logical operators are the logic functions AND, OR and NOT. Logic gates implement logic functions. Boolean Algebra: a useful mathematical system for specifying and transforming logic functions. We study Boolean algebra as a foundation for designing and analyzing digital systems!

3
3 Binary Variables Recall that the two binary values have different names: –True/False –On/Off –Yes/No –1/0 We use 1 and 0 to denote the two values.

4
4 Logical Operations The three basic logical operations are: –AND –OR –NOT AND is denoted by a dot (·). OR is denoted by a plus (+). NOT is denoted by an overbar ( ¯ ), or a single quote mark (') after,

5
5 Chapter 2 - Part 1 5 Logic Diagrams and Expressions Boolean equations, truth tables and logic diagrams describe the same function! Truth tables are unique; expressions and logic diagrams are not. This gives flexibility in implementing functions. X Y F Z Logic Diagram Equation ZY’ X F Truth Table 11 1 1 11 1 0 11 0 1 11 0 0 00 1 1 00 1 0 10 0 1 00 0 0 X Y Z Z X F Y’

6
6 1. 3. 5. 7. 9. 11. 13. 15. 17. Commutative Associative Distributive DeMorgan’s 2. 4. 6. 8. X. 1 X = X. 00 = X. XX = 0 = X. X’ Boolean Algebra An algebraic structure defined on a set of at least two elements, B, together with three binary operators (denoted +, · and ) that satisfies the following basic identities: 10. 12. 14. 16. X + YY + X = (X + Y)Z + X + (YZ)Z) += X(Y + Z)XYXZ += (X + Y)’X’. Y’ = XYYX = (XY)ZX(YX(YZ)Z) = X+ YZ(X + Y)(X + Z)= (X. Y)’X’ + Y’ = X + 0 X = + X 11 = X + XX = 1 = X + X’ (X’)’ = X

7
7 Chapter 2 - Part 1 7 Boolean Operator Precedence The order of evaluation in a Boolean expression is: 1.Parentheses 2.NOT 3.AND 4.OR Consequence: Parentheses appear around OR expressions Example: F = A(B + C)(C + D’)

8
8 Standard Representation of Logic Functions Truth Table –List all possible combinations of input and output –Not convenient for large # of variables ( > 5) Need more convenient alternative. X Y ZF 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 0 0 1 1

9
9 Canonical Forms What are Canonical Forms? Minterms and Maxterms Index Representation of Minterms and Maxterms Sum-of-Minterm (SOM) Representations Product-of-Maxterm (POM) Representations Representation of Complements of Functions Conversions between Representations

10
10 Minterms: Sum Of Products (SOP) X YF1 1 0 0 1 1 0 1 F2 0 1 0 F3 0 1 0 F4 0 1 F5 0 1 0 Minterm X’Y’ X’Y XY’ XY F6 0 1 Minterm: A logical product term that contains ALL variables of a logic expression only once, either complemented (if corresponding logic is 0) or not complemented (if corresponding logic is 1). Canonical Sum of Products (SOP): A logical sum of all minterms of logic expression for which the output is 1. m0m0 m1m1 m2m2 m3m3 F1 = X’Y’ = m 0 = X,Y (0) F2 = X’Y = m 1 = X,Y (1) F3 = XY’ = m 2 = X,Y (2) F4 = XY = m 3 = X,Y (3) F5 = m 1 + m 2 = X,Y (1,2) F6 = m 1 + m 2 + m 3 = X,Y (1,2,3)

11
11 Maxterms: Product Of Sums (POS) X YF1 0 1 0 0 1 1 0 1 F2 1 0 1 F3 1 0 1 F4 1 0 F5 0 1 0 Maxterm X+Y X+Y’ X’+Y X’+Y’ F6 0 1 Maxterm: A logical sum term that contains ALL variables of a logic expression only once, either complemented (if corresponding logic is 1) or not complemented (if corresponding logic is 0). Canonical Products of Sums (POS): A logical product of all maxterms of logic expression for which the output is 0. M0M0 M1M1 M2M2 M3M3 F1 = X+Y = M 0 = X,Y (0) F2 = X+Y’ = M 1 = X,Y (1) F3 = X’+Y = M 2 = X,Y (2) F4 = X’+Y’ = M 3 = X,Y (3) F5 = M 0. M 3 = X,Y (0,3) F6 = M 0 = X,Y (0)

12
12 Yes! F5 = m 1 + m 2 = X,Y (1,2) = X’Y + XY’ = M 0.M 3 = X,Y (0,3) = (X+Y).(X’+Y’) = XX’ + XY’ + X’Y + YY ’ = X’Y + XY’ SOP = POS SOP is NOT POS’ Are SOP and POS Equivalent? X Y 0 0 1 1 0 1 F5 0 1 0

13
13 Minterm Function Example Example: Find F 1 = m 1 + m 4 + m 7 F1 = x’ y’ z + x y’ z’ + x y z

14
14 Minterm Function Example F(A, B, C, D, E) = m 2 + m 9 + m 17 + m 23 F(A, B, C, D, E) =

15
15 Maxterm Function Example Example: Implement F1 in Maxterms: F 1 = M 0 · M 2 · M 3 · M 5 · M 6 F 1 = (x+y+z).(x+y’+z).(x+y’+z’).(x’+y+z’).(x’+y’+z)

16
16 Maxterm Function Example F(A, B,C,D) = 14 11 8 3 M M MM)D,C,B,A(F

17
17 Canonical Sum of Minterms Any Boolean function can be expressed as a Sum of Minterms. –For the function table, the minterms used are the terms corresponding to the 1's –For expressions, expand all terms first to explicitly list all minterms. Do this by “ANDing” any term missing a variable v with a term (v+v’). Example: Implement f = x + x’.y’ as a sum of minterms. First expand terms: f = x(y+y’)+x’y’ Then distribute terms: f = xy +xy’ +x’y’ Express as sum of minterms: f = m 3 + m 2 + m 0

18
18 Another SOM Example Example: F = A + B’. C There are three variables, A, B, and C which we take to be the standard order. Expanding the terms with missing variables: F = A(B + B’)(C + C’) + (A + A’) B’ C = ABC + ABC’ + AB’C + AB’C’ + AB’C + A’B’C = ABC + ABC’ + AB’C + AB’C’ + A’B’C Collect terms (removing all but one of duplicate terms): Express as SOM: F = m7 + m6 + m5 + m4 + m1 = m1 + m4 + m5 + m6 + m7

19
19 Shorthand SOM Form From the previous example, we started with: F = A + B’. C We ended up with: F = m 1 +m 4 +m 5 +m 6 +m 7 This can be denoted in the formal shorthand: Note that we explicitly show the standard variables in order and drop the “m” designators.

20
20 Canonical Product of Maxterms Any Boolean Function can be expressed as a Product of Maxterms (POM). –For the function table, the maxterms used are the terms corresponding to the 0's. –For an expression, expand all terms first to explicitly list all maxterms. Do this by first applying the second distributive law, “ORing” terms missing variable v with a term equal to (v.v’) and then applying the distributive law again. Example: Convert to product of maxterms: f(x,y,z) = x + x’.y’ Apply the distributive law: x + x’.y’ = (x+x’).(x+y’)= 1.(x+y’) = x+y’ Add missing variable z: x+y’ +z.z’ =(x+y’+z).(x+y’+z’) Express as POM: f = M 2 · M 3

21
21 Convert to Product of Maxterms: f(A,B,C) = A.C’+B.C+A’.B’ Use x + y z = (x+y)·(x+z) with x= (A.C’ + B.C), y=A’ and z=B’ to get: f = (A.C’+B.C+A’)(A.C’+B.C+B’) Then use x + x’.y = x + y to get: f = (C’+B.C+A’).(A.C’+C+B’) and a second time to get: f = (C’+B+A’).(A+C+B’) Rearrange to standard order: f = (A’+B+C’).(A+B’+C) to give f = M 5 · M 2 Another POM Example

22
22 Function Complements The complement of a function expressed as a sum of minterms is constructed by selecting the minterms missing in the sum-of-minterms canonical forms. Alternatively, the complement of a function expressed by a Sum of Minterms form is simply the Product of Maxterms with the same indices. Example: Given

23
23 Conversion Between Forms To convert between sum-of-minterms and product- of-maxterms form (or vice-versa) we follow these steps: –Find the function complement by swapping terms in the list with terms not in the list. –Change from products to sums, or vice versa. Example: Given F as before: Form the Complement: Then use the other form with the same indices – this forms the complement again, giving the other form of the original function:

24
24 Chapter 2 - Part 1 24 Standard Sum-of-Products (SOP) form: equations are written as an OR of AND terms Standard Product-of-Sums (POS) form: equations are written as an AND of OR terms Examples: –SOP: ABC+A’B’C+B –POS: (A+B).(A+B’+C’).C These “mixed” forms are neither SOP nor POS – (A.B+C).(A+C) – A.B.C’+A.C.(A+B) Standard Forms

25
25 Combinational Circuit Analysis Determine the output for certain input Algebraically manipulate logic expressions Transform algebraic expression into canonical form (SOP or POS)

26
26 Simplification of Circuits Example, Simplify the following function F = [((W.X’)’.Y)’+(W’+X+Y’)’+(W+Z)’]’ (a)Using algebra (b)Using Circuits (c) More and better techniques in coming lectures

27
27 Analysis Example XYZXYZ F Truth Table X Y ZF 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

28
28 Analysis Example XYZXYZ F Truth Table X Y ZF 0 0 0 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 1

29
29 Analysis Example (cntd.) XYZXYZ F Find an expression for F F =

30
30 Analysis Example (cntd.) XYZXYZ F Find an expression for F F = (X + Y’).Z + X’. Y. Z’

31
31 Analysis Example (cntd.) Find canonical SOP of F (need to expand) F = (X + Y’).Z + X’. Y. Z’ F = X.Z + Y’.Z + X’. Y. Z’ (SOP) F = X.Y.Z+ X.Y’.Z+ X.Y’.Z +X’.Y’.Z + X’.Y. Z’ F = X.Y.Z+ X.Y’.Z+ X’.Y’.Z +X’.Y.Z’ (Canonical SOP) F = X,Y,Z (1,2,5,7) (Canonical SOP) 2-level AND-OR Logic

32
32 Analysis Example (cntd.) Canonical of SOP, F = X.Y.Z+ X.Y’.Z+ X’.Y’.Z + X’.Y. Z’ X’ Y Z’ F X’ Y’ Z XYZXYZ X Y’ Z X’ Y Z’ F Y’ Z XZXZ SOP, 2-levels AND-OR Logic F = X.Z+ Y’.Z + X’.Y. Z’ Canonical of SOP is more expensive to represent a boolean function, more gates and more inputs

33
33 Analysis Example (cntd.) Find canonical POS of F F = (X + Y’).Z + X’. Y. Z’ Remember DL: a.b+c.d.e=(a+c)(a+d)(a+e)(b+c)(b+d)(b+e)? a = (X+Y’); b = Z; c = X’, d=Z’; e = Y; F= (X+Y’+X’).(X+Y’+Y).(X+Y’+Z’).(Z+X’).(Z+Y). (Z+Z’) F =1.1.(X+Y’+Z’).(Z+X’).(Z+Y).1 F =(X+Y’+Z’).(Z+X’).(Z+Y) (POS, 2-level OR- AND logic) not POS canonical yet

34
34 Analysis Example (cntd.) F =(X+Y’+Z’).(X’+Z).(Y+Z) F =(X+Y’+Z’).(X’+Y.Y’+Z).(X.X’+Y+Z) Again DL: a = X’+Z and b.c= Y.Y’ a + bc = (a+b)(a+c) F =(X+Y’+Z’).(X’+Y+Z).(X’+Y’+Z).(X+Y+Z).(X’+Y+Z) F =(X’+Y’+Z).(X’+Y+Z). (X+Y’+Z’). (X+Y+Z) F = X,Y,Z (0,3,4,6) Canonical POS, 2-level OR-AND logic

35
35 Design Example Alarm System: the alarm will sound-off if: -The panic button is pushed -OR alarm is enabled AND someone broke-in - Alarm locks are on door, window, & garage. Output : Alarm Sound Input: Panic Button (P), enable (E), Secure (S), where S = W.D.G (window, door, and garage) Assume that: S is active-low ( 0 if activated, 1 if deactivated) P is active-high (1 if activated, 0 if deactivated)

36
36 Design Example A = P + E.S’ S = W.G.D E D’ A E G’ E W’ P

37
37 NAND Gates Use less transistors, cheaper to implement, less power consumption etc. How to convert a logic circuit to NAND-NAND circuit: -Find 2-level AND-OR (SOP) implementation -Replace all gates by NAND gates -convert single literal inputs to 2 nd NAND level gate

38
38 NAND-NAND circuits Example E D’ A E G’ E W’ P E D’ A E G’ E W’ P E D’ A E G’ E W’ P

39
39 NOR Gates To convert a logic circuit to NOR-NOR circuit: -Find 2-level OR-AND (POS) implementation -Replace all gates by NOR gates -Invert single literal inputs to 2 nd level NOR gate

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google