Boolean Algebra and Logic Gate Chapter 3 Boolean Algebra and Logic Gate
Basic Operations of Boolean Algebra Boolean algebra – used in electronic digital circuit design Introduced by George Boole in 1854 Algebra : uses variables (statements) and operations (relations) Boolean algebra : logic variable (TRUE (1) or FALSE (0)) and logical operations
Three basic logical operations: AND . dot OR + plus sign NOT ¯ overbar Example: A AND B = A.B A OR B = A + B NOT A = Ā These operations are used to combine operands to form logical expressions X or NOT (X) X.Y + Z or NOT (X AND Y) OR Z (X.Y) + (Y.Z) or (X AND NOT(Y)) OR (Y AND Z)
OR yields true if either or both of its operands are true AND yields true (binary value 1) if and only if both of its operands are true OR yields true if either or both of its operands are true NOT inverts the value of its operand, true to false NAND gives the true result if one or both of the operands are false NOR only gives the true value if and only if both operands are false XOR gives the true value if and only if only one operand is true P Q NOT P P AND Q P OR Q P XOR Q P NAND Q P NOR Q 1
Match the items on the right with the items on the left. a) Gives a 0 when both Input A and Input B are a 1. AND X-OR b) Gives a 1 if either Input A or Input B is a 1, but not both. OR NAND c) Gives a 1 if both Input A and Input B are 1 d) Gives a 1 if either Input A or Input B is a 1
Relationship Between Basic Operation of Boolean and Basic Logic Gate The basic construction of a logical circuit is gates Gate is an electronic circuit that emits an output signal as a result of a simple Boolean operation on its inputs Logical function is presented through the combination of gates The basic gates used in digital logic is the same as the basic Boolean algebra operations (e.g., AND, OR, NOT,…)
The package Truth Tables and Boolean Algebra set out the basic principles of logic. A B F 0 0 0 0 1 0 0 0 1 1 1 0 1 1 0 1 F Name Graphic Symbol Boolean Algebra Truth Table A B AND OR NOT NAND NOR F = A . B Or F = AB F = A + B _____ ____ _ F = A B F 0 1 1 0 the symbols, algebra signs and the truth table for the gates
Basic Theorems of Boolean Algebra 1. Identity Elements 2. Inverse Elements 1 . A = A A . A = 0 0 + A = A A + A = 1 3. Idempotent Laws 4. Boundess Laws A + A = A A + 1 = 1 A . A = A A . 0 = 0 5. Distributive Laws 6. Order Exchange Laws A . (B + C) = A.B + A.C A . B = B . A A + (B . C) = (A+B) . (A+C) A + B = B + A 7. Absorption Laws 8. Associative Laws A + (A . B) = A A + (B + C) = (A + B) + C A . (A + B) = A A . (B . C) = (A . B) . C 9. Elimination Laws 10. De Morgan Theorem A + (A . B) = A + B (A + B) = A . B A . (A + B) = A . B (A . B) = A + B
Identity Elements : 1 . A = A
Boundess Laws : A . 0 = 0 A + 1 = 1
Relationship Between Boolean Function and Logic Circuit Boolean function Q = AB + B = (NOT A AND B) OR B Logic circuit A A AB B B Q = AB + B
Relationship Between Boolean Function and Logic Circuit Boolean function e.g. F = A . B + C + D ((A AND B) OR (C NOR D)) or ((A AND B) OR NOT (C OR D)) Any Boolean function can be implemented in electronic form as a network of gates called logic circuit A.B = AB A B F = AB + C + D C D C + D
G = A . (B + C + D) A G = A . (B + C + D) B B + C + D C D C + D
Try to work out the output of the combination. C = A.B A = 0, B = 0, C = ?, Q = ? C = 1, Q = 0 A = 1, B = 0, C = ?, Q = ? C = 1, Q = 0 C = 1, Q = 0 A = 0, B = 1, C = ?, Q = ? C = 0, Q = 1 A = 1, B = 1, C = ?, Q = ?
Truth Table
The Exclusive OR gate (XOR) XOR 1 when A or B are 1 but not both For the XOR gate the truth table looks like this: A Output B A B OUTPUT 1
For the NAND gate the truth table looks like this: Output B For the NAND gate the truth table looks like this: A B OUTPUT 1
For the NOR gate the truth table looks like this: Output B For the NOR gate the truth table looks like this: A B OUTPUT 1
A B C Q 1 Truth Table A = 0, B = 0, C = 1, Q = 0 1
Truth Table A B Q 1
A B Q AB = AB + B Produce a truth table from the logic circuit A B A AB Q 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1
p q r p . q q q + r 0 1 1 1 1 1 1 1 1 1 1 1 1
Elimination Laws: A.(A + B) = A.B Proof using truth table. A B A A + B A.B A.(A + B) 0 0 1 1 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 1 1 1 Proof the Absorption Laws: A . (A + B) = A using truth table.