Logic-Design-Boolean-Algebra-and-Logic-Gate (2)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

Logic Design

Boolean Algebra and Logic Gate


Logic Gates

• The logic gate is the basic building block in digital systems.

2
Logic Gates

3
Logic Gates

• Digital systems are constructed by using three basic logic gates.


• These basic gates are: (1) AND gate, (2) OR gate, and (3) NOT gate.
• Logic gates operate with binary numbers. Gates are therefore
referred to as binary logic gates.

4
Logic Gates

• Logic gates operate with binary numbers. Gates are therefore


referred to as binary logic gates.

5
AND gate (2-input AND gate)

• The standard logic symbol:

• The truth table:


Note: The AND gate is called:
“all or nothing” gate.

6
AND gate (2-input AND gate)

• Boolean algebra is a form of symbolic logic that shows how logic


gates operate.
• A Boolean expression is a “shorthand” method of showing what is
happening in a logic circuit.
A.B = Y
AB = Y
• The Boolean expression is read as A AND (. means AND) B equals the
output Y .
• The dot (.) mean the logic function AND in Boolean algebra, not
multiply as in regular algebra.

7
AND gate (3-input AND gate)

• A logic circuit has three variables.

8
AND gate (4-input AND gate)

• Homework.

9
AND gate: The laws of Boolean algebra

• The laws of Boolean algebra govern how AND gates operate. The
formal laws for the AND function are:

10
AND gate: exercise 1

• What would the output pulse train look like?

• The output waveform would look exactly like the input waveform at
input A.

11
AND gate: exercise 2

• what would the output pulse train look like? (two pulse trains are
being ANDed)

12
OR gate (2-input OR gate)

• The OR gate is called the “any or all” gate.


• The standard logic symbol:

• The truth table

13
OR gate (2-input OR gate)

• Boolean expression for this OR function is given as:


A + B = Y.
• Note that the plus ( + ) symbol means OR in Boolean algebra. The
expression ( A + B = Y ) is read as A OR (+ means OR) B equals output
Y.
• The plus sign does not mean to add as it does in regular algebra.

14
OR gate (3-input OR gate)

15
OR gate (4-input OR gate)

Homework

16
OR gate: The laws of Boolean algebra

• The laws of Boolean algebra govern how OR gates operate. The


formal laws for the OR function are:

• The bar over the last variable means not A , or the opposite of A .

17
OR gate: exercise 1

• What would the output pulse train look like?

• The output waveform would look exactly like the input waveform at
input A.

18
OR gate: exercise 2

• What would the output pulse train look like? (two pulse trains are
being ORed)

19
NOT gate
• A NOT gate is also called an inverter.
• The NOT gate has only one input and one output.
• The input A is inverted (not A)/complement A.

20
NOT gate: The laws of Boolean algebra

21
Other logic gates:

1. NAND gate
2. NOR gate
3. exclusive-OR gate
4. exclusive-NOR gate
• Combining Logic Gates

22
Seven logic gate

• The AND, OR, and NOT gates are the most fundamental.
• Four other useful logic gates can be made from these fundamental
devices; NAND gate, the NOR gate, the exclusive-OR gate, and the
exclusive-NOR gate.
• At the end of this chapter, you will know the logic symbol, truth table,
and Boolean expression for each gate.

23
NAND gate

• The NAND logic symbol is an AND symbol with a small bubble at the
output (invert bubble). The invert bubble provides a simplified
method of representing the NOT gate.

24
NAND gate

• The truth table describes the


exact operation of a logic gate.
• The AND-gate truth table shows
how each output is inverted to
give the NAND output.

25
3-input NAND gate

26
Exercise 1

• What would the output pulse train if input B is 0?

• The output of the NAND gate shown is always 1.

27
Exercise 2

• What would the output pulse train if input B is 1?

• The output would be an inverted copy of the waveform at input A.


The output pulses are:

28
NOR gate

29
NOR gate

• The output column of the NOR


gate is the complement (has
been inverted) of the shaded
OR column.
• The unique output from the
NOR gate is a HIGH when all
inputs are LOW.

30
3-input NOR gate

31
Exercise 1

• What would the output pulse train if input B was 1?

• The output of the NOR gate would always be 0.

32
Exercise 2

• What would the output pulse train if input B was 0?

• The output would be an inverted copy of the waveform at input A.


The output pulses are:

33
EXCLUSIVE-OR gate (XOR)

• The exclusive-OR term is often shortened to read as XOR.


• It is said that inputs A and B are exclusively ORed together.

34
EXCLUSIVE-OR gate

• The exclusive-OR gate is referred


to as the “any but not all” gate.
• The XOR gate is enabled only when
an odd number of 1s appear at the
inputs.
• Odd-bits check circuit.

35
3-input EXCLUSIVE-OR gate

36
Exercise
• What will the pulse train at the output of the XOR
gate?

• The output pulses from the XOR gate is as follows:

37
EXCLUSIVE-NOR gate (XNOR)
• The output of an XOR gate is inverted.

38
EXCLUSIVE-NOR gate (XNOR)
• XNOR gate detects even numbers of 1s.

39
3-input EXCLUSIVE-NOR gate (XNOR)

40
Exercise

• What will the pulse train at the output of the XNOR


look like?

• The output pulses from the XNOR gate is:

41
Combining Logic Gates: AND-OR pattern

42
Combining Logic Gates: AND-OR pattern

43
Exercise 1

44
Exercise 1

45
Exercise 2

46

You might also like