Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Ch.3 Logic Gates and Boolean Algebra – Part 1

Similar presentations


Presentation on theme: "1 Ch.3 Logic Gates and Boolean Algebra – Part 1"— Presentation transcript:

1 1 Ch.3 Logic Gates and Boolean Algebra – Part 1 kjspace@nlsun.inha.ac.kr

2 2 Objectives Three basic logic operations: AND, OR, NOT Operation of logic circuits and construction of truth tables Timing diagrams for the various logic-circuit gates Boolean expression for the logic circuits Implement logic circuits using AND, OR, NOT Simplify logic expressions –DeMorgan’s theorem Using NAND or NOR to implement a circuit Alternate gate symbols vs. standard logic-gate symbols Active high & Active low

3 3 3-1 Boolean Constants and variables Boolean constants and variables are allowed to have only two possible values, 0 or 1. Boolean 0 and 1 do not represent actual numbers but instead represent the state of a voltage variable, or what is called its logic level. 0/1 and Low/High are used most of the time. Three Logic operations: AND, OR, NOT Logic Gates –Digital circuits constructed from diodes, transistors, and resistors whose output is the result of a basic logic operation(OR, AND, NOT) performed on the inputs.

4 4 3-2 Truth Tables How a logic circuit’s output depends on the logic levels present at the inputs.

5 5 3-3 OR Operation with OR gates Truth Table and circuit symbol

6 6 3-3 symbol and truth table for a three- input OR gate

7 7 Summary of OR operation Produce a result of 1 whenever any input is 1. Otherwise 0. An OR gate is a logic circuit that performs an OR operation on the circuit's input The expression x=A+B is read as “x equals A OR B”

8 8 Example of the use of an OR gate in an Alarm system

9 9 Example 2

10 10 Example3

11 11 Review Questions What is the only set of input conditions that will produce a LOW output for any OR gate? Write the Boolean expression for a six-input OR gate If the A input in previous example is permanently kept at the 1 level, what will the resultant output waveform be?

12 12 3-4 And Operation with And Gates Truth Table and Gate symbol

13 13 Truth Table and Symbol for a three-input AND gate

14 14 Summary of the AND operation The AND operation is performed the same as ordinary multiplication of 1s and 0s. An AND gate is a logic circuit that performs the AND operation on the circuit’s inputs. An AND gate output will be 1 only for the case when all inputs are 1; for all other cases the output will be 0. The expression x=AB is read as “x equals A AND B.”

15 15 Chapter 3 Notes – Part II Review Questions What is the only input combination that will produce a HIGH at the output of a five-input AND gate? What logic level should be applied to the second input of a two-input AND gate if the logic signal at the first input is to be inhibited(prevented) from reaching the output? True or false: An AND gate output will always differ from an OR gate output for the same input conditions. kjspace@nlsun.inha.ac.kr

16 16 NOT operation Truth table, Symbol, Sample waveform

17 17 Summary of Boolean Operations OR 0+0=00+1=11+0=11+1=1 AND 00=001=010=011=1 NOT 1’=00’=1 (NOTE THE SYMBOL USED FOR NOT!)

18 18 3-6 Describing logic circuits algebraically Any logic circuit, no matter how complex, can be completely described using the three basic Boolean operations: OR, AND, NOT. Example: logic circuit with its Boolean expression

19 19 Parentheses (Often needed to establish precedence; sometimes used optionally for clarity) How to interpret A  B+C? –Is it A  B ORed with C ? –Is it A ANDed with B+C ? Order of precedence for Boolean algebra: AND before OR. Parentheses make the expression clearer, but they are not needed for the case on the preceding slide. Note that parentheses are needed here :

20 20 Circuits Contains INVERTERs Whenever an INVERTER is present in a logic-circuit diagram, its output expression is simply equal to the input expression with a bar over it.

21 21 More Examples

22 22 Precedence First, perform all inversions of single terms Perform all operations with parentheses Perform an AND operation before an OR operation unless parentheses indicate otherwise If an expression has a bar over it, perform the operations inside the expression first and then invert the result

23 23 Determining output level from a diagram Determine the output for the condition where all inputs are LOW.

24 24 3-8 Implementing Circuits From Boolean Expressions When the operation of a circuit is defined by a Boolean expression, we can draw a logic-circuit diagram directly from that expression.

25 25 Example Draw the circuit diagram to implement the expression

26 26 Review Question Draw the circuit diagram that implements the expression Using gates having no more than three inputs.

27 27 3-9 NOR GATES AND NAND GATES NOR Symbol, Equivalent Circuit, Truth Table

28 28 Example

29 29 Example Determine the Boolean expression for a three-input NOR gate followed by an INVERTER

30 30 NAND Gate Symbol, Equivalent circuit, truth table

31 31 Example

32 32 Example Implement the logic circuit that has the expression using only NOR and NAND gates

33 33 Example Determine the output level in last example for A=B=C=1 and D=0

34 34 Review Questions What is the only set of input conditions that will produce a HIGH output from a three-input NOR gate? Determine the output level in last example for A=B=1, C=D=0 Change the NOR gate at last example to a NAND gate, and change the NAND to a NOR. What is the new expression for x?

35 35 3-10 Boolean Theorems (single-variable)

36 36 Multivariable Theorems x+y = y+xxy = yx commutativity (x+y) + z = x + (y + z)(xy)z = x(yz)associativity x(y+z) = xy + xzx + yz = (x+y) (x+z)distributivity x + xy = x pf: x+xy = x1 + xy = x(1+y) = x1 = x

37 37 Examples Simplify the expression Simplify

38 38 Review Questions Simplify

39 39 3-11 Demorgan’s Theorems

40 40 Example Simplify the expression to one having only single variables inverted.

41 41 Implications of DeMorgan’s Theorems(I)

42 42 Implications of DeMorgan’s Theorems(II)

43 43 Example Determine the output expression for the below circuit and simplify it using DeMorgan’s Theorem

44 44 Review Questions Using DeMorgan’s Theorems to convert the expressions to one that has only single-variable inversions. Use only a NOR gate and an INVERTER to implement a circuit having output expression: Use DeMorgan’s theorems to convert below expression to an expression containg only single-variable inversions.

45 45 3-12 Universality of NAND and NOR gates

46 46 Universality of NOR gate

47 47 Example

48 48 Example

49 49 3-13 Alternate Logic-Gate Representations Standard and alternate symbols for various logic gates and inverter.

50 50 How to obtain the alternative symbol from standard ones Invert each input and output of the standard symbol, This is done by adding bubbles(small circles) on input and output lines that do not have bubbles and by removing bubbles that are already there. Change the operation symbol from AND to OR, or from OR to AND.(In the special case of the INVERTER, the operation symbol is not changed)

51 51 Several points The equivalences can be extended to gates with any number of inputs. None of the standard symbols have bubbles on their inputs, and all the alternate symbols do. The standard and alternate symbols for each gate represent the same physical circuit; there is no difference in the circuits represented by the two symbols. NAND and NOR gates are inverting gates, and so both the standard and the alternate symbols for each will have a bubble on either the input or the output, AND and OR gates are noninverting gates, and so the alternate symbols for each will have bubbles on both inputs and output.

52 52 Logic-symbol interpretation Active high/low –When an input or output line on a logic circuit symbol has no bubble on it, that line is said to be active-high, otherwise it is active-low.

53 53 Interpretation of the two NAND gate symbols

54 54 Interpretation of the two OR gate symbols

55 55 Review Questions Write the interpretation of the operation performed by the below gate symbols –Standard NOR gate symbol –Alternate NOR gate symbol –Alternate AND gate symbol –Standard AND gate symbol


Download ppt "1 Ch.3 Logic Gates and Boolean Algebra – Part 1"

Similar presentations


Ads by Google