DLD Chapter 3 pp
DLD Chapter 3 pp
2
Logical Elements and Boolean Algebra
14
3. NOT Gate
A NOT gate is a one-input, one-output logic circuit.
The output of NOT gate is always the complement of the
input.
That is, a LOW input produces a HIGH output, and vice
versa.
It is also known as a ‘complementing circuit’ or an
‘inverting circuit’.
Figure 2.9 shows the circuit symbol and the truth table.
The NOT operation on a logic variable X is denoted as X
or X.
That is, if X is the input to a NOT circuit, then its output
Y is given by Y= X or X and reads as Y equals NOT X.
Thus, if X = 0, Y = 1 and if X = 1, Y = 0.
16
Figure 7(a): Circuit symbol of NOT gate and (b) Truth-table
of NOT gate 17
4. EXCLUSIVE-OR Gate
The EXCLUSIVE-OR gate, commonly written as EX-OR gate, is
a two-input, one-output gate.
The output of an EX-OR gate is a logic ‘1’ when the inputs are
unlike and a logic ‘0’ when the inputs are like.
Although EX-OR gates are available in integrated circuit form
only as two-input gates, unlike other gates which are available in
multiple inputs also, multiple-input EX-OR logic functions can be
implemented using more than one two-input gates.
The output of a multiple-input EX-OR logic function is a logic ‘1’
when the number of 1’s in the input sequence is odd and a logic
‘0’ when the number of 1’s in the input sequence is even,
including zero.
That is, an all 0’s input sequence also produces a logic ‘0’ at the
output.
The output of a two-input EX-OR gate is expressed by the
following Boolean expression.
21
Figure 8(a) Circuit symbol of a two-input EXCLUSIVE-OR gate, (b)
the truth table of a two-input EXCLUSIVE-OR gate and (c) the truth
table of a four-input EXCLUSIVE-OR gate 22
Activity 2.3
3. How do you implement three-input and four-input
EX-OR logic functions with the help of two-input
EX-OR gates?
Solution
Figures 2.11(a) and (b) show the implementation of
a three-input EX-OR logic function and a four-input
EX-OR logic function using two-input logic gates:
For Fig. 2.11(a), the output Y1 is given by A ⊕ B.
The final output Y is given by Y = (Y1 ⊕)=
(A⊕B)⊕C = A⊕B⊕C.
Figure 2.11(b) can be explained on similar lines.
23
Figure 9 (a): Three-input EX-OR gate and (b) a four-input EX-OR
gate 24
5. NAND Gate
In general, the Boolean expression for a NAND gate with more than
two inputs can be written as 25
Figure 11 (a) Two-input NAND implementation using an
AND gate and a NOT circuit, (b) the circuit symbol of a
two-input NAND gate and (c) the truth table of a two-input
NAND gate 26
6. NOR Gate
NOR stands for NOT OR.
An OR gate followed by a NOT circuit makes it a
NOR gate [Fig. 2.14(a)].
The truth table of a NOR gate is obtained from the
truth table of an OR gate by complementing the
output entries.
The output of a NOR gate is a logic ‘1’ when all
its inputs are logic ‘0’.
For all other input combinations, the output is a
logic ‘0’.
The output of a two-input NOR gate is logically
expressed as 27
Figure 12(a) Two-input NOR implementation using an OR gate and a
NOT circuit, (b) the circuit symbol of a two-input NOR gate and (c) the
truth table of a two-input NOR gate.
• In general, the Boolean expression for a NOR gate with more than
two inputs can be written as 28
7. EXCLUSIVE-NOR Gate
EXCLUSIVE-NOR (commonly written as EX-NOR) means NOT
of EX-OR, i.e. the logic gate that we get by complementing the
output of an EX-OR gate.
Figure 2.15 shows its circuit symbol along with its truth table.
The truth table of an EX-NOR gate is obtained from the truth
table of an EX-OR gate by complementing the output entries.
Logically,
29
The output of a two-input EX-NOR gate is a
logic ‘1’ when the inputs are like and a logic ‘0’
when they are unlike.
In general, the output of a multiple-input EX-
NOR logic function is a logic ‘0’ when the
number of 1s in the input sequence is odd and a
logic ‘1’ when the number of 1s in the input
sequence is even including zero.
That is, an all 0s input sequence also produces a
logic ‘1’ at the output
30
Exercise
31