320 likes | 425 Vues
This chapter explores the fundamentals of logic gates and Boolean algebra, emphasizing how to evaluate expressions using the correct order of operations. Learn to invert terms, use parentheses, and perform AND and OR operations effectively. Through practical examples, such as evaluating expressions with given variable values and creating circuits from Boolean expressions, this chapter reinforces key concepts that form the foundation of digital logic design. The material also covers essential Boolean theorems and laws for simplifying expressions, aiding in circuit creation.
E N D
Chapter 3 Logic Gates & Boolean Algebra
Evaluating Expressions Order of operation: • Invert single terms • Parentheses • AND operations • Invert result of any of the AND operations • OR operations • Invert result of any of the OR operations
Evaluating Expressions We can plug in values into an expression Example: Evaluate the following expression, where A = 0, B = 1, C = 1, D = 1 X = ABC(A + D) X = 011(0 + 1) substitute the values X = 111(0 + 1) apply the inverter X = 111(1) OR first – inversion is over entire term X = 111(0) invert the parenthesis X = 1110 parenthesis means AND so not needed now X = 0 1 and 1 and 1 and 0 = 0
Evaluating Logic Circuits 1 0 1 1 1 1 0 1 0 1 1 0 1
Creating Circuits From Expressions AC + BC + ABC Last operation to be performed in the equation: The OR of 3 terms + BC + ABC AC
Creating Circuits From Expressions Next operation to be performed in the equation: The 3 AND terms A B C AC A C BC B C A ABC B C
Creating Circuits From Expressions Last operation to be performed in the equation: The 2 Inversions A B C C A AC + BC + ABC
You Try This One! (D + (A + B)C) E A B C D E
You Try This One! (D + (A + B) C) A B C D E
You Try This One! (A + B) C) A B C D E
You Try This One! (A + B) C) A B C D E
You Try This One! (A + B) A B C D E (D + (A + B)C) E
NOR Gates same as: A + B Expression: Truth Table: A B A + B A + B 0 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0
NOR Gates Note: Two bars over the same expression cancel each other A + B = A + B
NOR Gates Note: Bars must be over the entire expression A + B = A + B A B X 0 0 0 0 1 0 1 0 0 1 1 1 A B X 0 0 0 0 1 1 1 0 1 1 1 1
NAND Gates same as: AB Expression: Truth Table: A B AB AB 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0
NAND / NOR Gate Example AB(C + D) C D A B
Boolean Theorems Theorem #1: X 0 = 0 A X Z 0 0 0 0 1 0 1 0 0 1 1 1
Boolean Theorems Theorem #2: X 1 = X A X Z 0 0 0 0 1 0 1 0 0 1 1 1
Boolean Theorems Theorem #3: X X = X A X Z 0 0 0 0 1 0 1 0 0 1 1 1
Boolean Theorems Theorem #4: X X = 0 A X Z 0 0 0 0 1 0 1 0 0 1 1 1
Boolean Theorems Theorem #5: X + 0 = X A X Z 0 0 0 0 1 1 1 0 1 1 1 1
Boolean Theorems Theorem #6: X + 1 = 1 A X Z 0 0 0 0 1 1 1 0 1 1 1 1
Boolean Theorems Theorem #7: X + X = X A X Z 0 0 0 0 1 1 1 0 1 1 1 1
Boolean Theorems Theorem #8: X + X = 1 A X Z 0 0 0 0 1 1 1 0 1 1 1 1
Boolean Theorems Theorem #9: X + Y = Y + X Commutative Laws The order of the variables is unimportant. Theorem #10: X Y = Y X
Boolean Theorems Theorem #11: X + (Y + Z) = (X + Y) + Z = X + Y + Z Associative Laws The grouping of like terms is unimportant Theorem #12: X(YZ) = (XY)Z = XYZ
Boolean Theorems Theorem #13: X(Y + Z) = XY + XZ Distributive Law Expanding expressions is done the same way as with ordinary algebra.
Boolean Theorems The distributive law also allows us to factor. Example: = B(AC + AC) ABC + ABC
Boolean Theorems Theorem #14: X + XY = X Proof by factoring: X + XY = X(1 + Y) X(1 + Y) = X(1) Thm 6: X + 1 = 1 X(1) = X Thm 2: X(1) = X
Boolean Theorems Theorem #15: X + XY = X + Y Variation: Let X represent X X + XY so…. X + XY = X + Y
Boolean Theorems X + XY = X + Y Proof: X + XY = X + Y X0 0 1 1 Y 0 1 0 1 X 1 1 0 0 XY 0 1 0 0 XY+X 0 1 1 1 X+Y 0 1 1 1 XY 0 0 0 1 XY+X 1 1 0 1 X+Y 1 1 0 1