LOGIC GATES
LOGIC GATE
I NTRODUCTI ON
A logic gate is a digi tal circuit circui t which is based on certain logical relat ionship between the input and the output voltages of the circuit. The logic gates are built using the semiconductor diodes and transistors. Each logic gate is represented by tits characteristic symbol. The operation of a logic gate is indicated in a table, known as truth table. This table contains all possible combinations of inputs and the corresponding outputs. A logic logi c gate i s also represented by a Boolean algebrai c expr ession. Boolean algebra i s a method of writing equations showing how an output depends upon the combination of inputs. Boolean algebra was invented by George Boole. Basic Basic l ogic gates gates (1) OR gate (2) AND gate, and (3) NOT gate The OR gate : - The output and a n OR gate attains the state 1 if o ne or more inputs attain t he state 1. Logi c symbol of OR gate gate A Y = A+ B
B
The Boolean ex pression of OR gate iis s Y = A + B, read as Y equals A or B. Truth table of a two inp ut OR gate Input A 0 0 1 1
B 0 1 0 1
Output Y 0 1 1 1
The AND gate : The output of an AND gat attains the state state 1 if and onl y if all the inputs are in state 1. Logic symbol of AND AND gate gate A Y = AB
B
The Boolea Boolean n expres expressio sion n of AND AND gate gate is Y = A.B A.B Truth table of a two i npu t AND AND gate
It is read read as Y equal equal A and B
Input A 0 0 1 1
B 0 1 0 1
Output Y 0 0 0 1
The NOT gate : The output of a NOT gate attai ns the state 1 if and only if the i nput does not attain the state 1. Logic symbol of NOT NOT gate A
The Boolean expression is Y Truth table of NOT gate
Y
A , read as Y equal s NOT A. Input A 0 1
NARAYANA
Output B 1 0 INSTITUTE
174
LOGIC GATES
COMBINATION OF GATES : The three basis gates (OR, AND and NOT) when connected in various combinations give us logic gates such as NAND, NOR gates, which are the universal building blocks of digital circuits. The NAND gate Logi c symbol of NAND gate A Y = AB
B
The Boolean expression of NAND gate is Y AB Truth table of a NAND gate Input A 0 0 1 1
Output Y 1 1 1 0
B 0 1 0 1
The NOR gate : Logi c symbol of NOR gate A Y = A+ B
B
The Boolean expression of NOR gate is Y
A B
Truth table of a NOR gate Input A 0 0 1 1
Output Y 1 0 0 0
B 0 1 0 1
UNIVERSAL GATES : The NAND or NOR gate is the universal building block of all digital circuits. Repeated use of NAND gates (or NOR gates) gives other gates. Therefore, any digital system can be achiev ed entirely from NAND or NOR gates. We shall show how the repeated use of NAND (and NOR) gates will gives use different gates. The NOT gate fro m a NAND gate : When all the inputs of a NAND gate are connected together, as shown in the figure, we obtain a NOT gate A Y B
Truth table of single-input NAND gate Input A B = (A) 0 0 1 1
Output Y 1 0
The AND gate from a NAND gate : If a NAND gate is followed by a NOT gate (i.e., a single input NAND gate), the resulting circuit is an AND gate as shown in figure and truth the table given show how an AND gate has been obtained from NAND gates. A Y
Y’
B
Truth table A 0 0 1 1
B 0 1 0 1
NARAYANA
Y' 1 1 1 0
Y 0 0 0 1
INSTITUTE
175
LOGIC GATES
The OR gate from NAND gate : If we invert the inputs A and B and then apply them to the NAND gate, the resulting circuit is an OR gate. A A Y B
B
Truth table A B
A B Y
0
0
1
1
0
0
1
1
0
1
1
0
0
1
1
1
1
0
0
1
The NOT gate from NOR gates : When all the inputs of a NOR gate are connected together as shown in the figure, we obtain a NOR gate. A
y
B
The AND gate from NOR gates : If we invert the inputs A and B and then apply them to the NOR gate, the resulting circuit is an AND gate. A Y B
The OR gate from NOR gate : If a NOR gate is followed by a single input NOR gate (NOT gate), the resulting circuit is an OR gate. A
Y
B
XOR AND XNOR GATE : The exclusive - OR gate (XOR gate) : The output of a two -input XOR gate attains the state 1 if one and only one input attains the state 1. Logi c symbol of XOR gate A
Y
B
The Boolean expression of XOR gate is Y
A B AB or Y
AB
Truth table of a XOR gate Input A 0 0 1 1
B 0 1 0 1
Ouput Y 0 1 1 0
Exclusive : NOR gate (XNOR gate) The output is in state 1 when its both input are the same that is, both 0 or both 1.
NARAYANA
INSTITUTE
176
LOGIC GATES
Logi c symbol of XNOR gate A
Y
B
The Boolean expression of XNOR gate is Y = A.B + A.B or Y = A B Truth table of a XNOR gate Input A 0 0 1 1
B 0 1 0 1
Ouput Y 0 0 0 1
Laws of Boolean Algebra Basic OR, AND, and NOT operations are given below : OR
AND
NOT
A + 0 = A
A. 0 = 0
A + A = 1
A + 1 = 1
A. 1 = 1
A. A = 0
A + A = A
A . A = A
A . A = A
Boolean algebra obeys commutative, associative and distributive laws as given below : Commutative laws : A + B = B + A ; AB = BA Ass oc iati ve law s : A + (B + C) = (A + B) + C; A. (B. C) = (A. B). C Distributive laws : A (B + C) = AB + AC Some other useful identities : (i) A + AB = A; (ii) A. (A + B) = A. (iii) A + A B = A + B (iv) A. ( A + B) = AB (v) A + BC = (A + B) (A + C) (vi) ( A + B) (A + C) = A C De Morgan’s theorem : First theorem :
A B A.B Second theorem :
A.B A B NARAYANA
INSTITUTE
177
LOGIC GATES
RAPID
REVISION
NARAYANA
PACKAGE
INSTITUTE
178
LOGIC GATES
EXERCISE # 2 Q.1
Following circuit performs the logic function of [1] AND gate
Q.2
[2] NAND gate
[3] numbers
[CBSE PM/PD-1998]
0
0
1
0
0
1
1
1
1
0
(a)
(b)
(c)
(d)
[1] a and b
[2] b and c
[3] c and d
[4] a and d
How many AND gate are required to form NAND gate [1] 1
[2] 3
[BHU-1997]
[3] 2
The truth table shown below is for which of the following gate A 1 1 0 0 [1] AND
Q.6
[4] symbol
Which of the following gates will have an output of 1 0
Q.5
[4] XOR gate [AIIMS-1999]
[2] truth
1
Q.4
[3] OR gate
Boolean algebra is essentially based on [1] logic
Q.3
[CBSE PM/PD-2003]
B 1 0 1 0
[4] 4 [CBSE PM/PD-1997]
Y 0 0 0 1
[2] NAND
[3] XOR
The symbol r epresents -
[4] NOR [CBSE PM/PD - 1996]
A Y B
[1] NAND gate Q.7
[2] OR gate
[3] AND gate
[4] NOR gate
Given below are symbols for some logic gates -
[AFMC-1994]
Y
(a)
(b)
(c)
(d)
The XOR gate and NOR gate respectiv ely are [1] a and b Q.8
[3] c and d
[4] a and d
In the Boolean algebra A.B equals [1] A + B
Q.9
[2] b and c
[BHU-1994]
[2] A B
[3] A . B
Which of the following gate corresponds to the truth table given below A 0 0 1 1
[1] NAND
B 0 1 0 1
[4] A.B [CBSE PM/PD-1994,95]
Y 1 1 1 0
[2] AND
[3] XOR
Q.10 In Boolean algebra Y = A + B implies that -
[4] OR [CBSE PM/PD-1993]
[1] Output Y exists when both input A and B exist [2] output Y exists when either input A exists or input B exist or both inputs A and B exist [3] Output Y exists when either input A exists or input B exist but not when both inputs A and B exist. [4] Output Y exists when both inputs A and B exist but not when either input A or B exists.
NARAYANA
INSTITUTE
179
LOGIC GATES
EXERCISE # 1 Q.24 What would be the output of the circuit whose Boolean expression [1] 1
[2] 0
[3] both 1 & 2
[4] none of these
Q.23 An OR gate is fol lowed by a sin gle input NAND gate. Using two i nputs A a nd B, the Bool ean exp ression of the output Y is [1] Y A B
[2] Y = A + B
[3] Y = AB
[4] Y = AB
Q.22 Which of the following relations is valid for Boolean algebra [1] A + A = A
[2] A. A = A
[3] A. A
0
[4] A + 1 = 1
[5] All Q.21 The output Y of the combination of gates shown in equal to A
Y AND
B OR
[1] A
[2] A
[3] A + B
[4] AB
Q.20 The truth table shown in of A 0 0 1 1
[1] NAND gate
B 0 1 0 1
[2] NOR gate
Y 0 1 1 0
[3] XOR gate
[4] XNOR gate
Q.19 ‘Output is LOW i f and only if all the i nputs are HIGH’ Indicate the logic gate f or which the above statement in true. [1] AND
[2] OR
[3] NOR
[4] NAND
Q.18 The output of a two input NOR gate is in state 1 when [1] either input terminals is at 0 state
[2] either input terminals is at 1 state
[3] both input terminals are at 0 state
[4] both input terminals are at 1 state
Q.17 The NOR gate is logically equivalent to an OR gate followed by [1] an inverter
[2] a NOR gate
[3] a NAND gate
[4] an OR gate
[3] a NOR gate
[4] a XOR gate
[3] NOR, OR
[4] NAND, NOR
Q.16 A NAND gate fol lowed by a NOT gate is [1] an OR gate
[2] an AND gate
Q.15 Which of the following paris are universal gates [1] NAND, NOT
[2] NAND, AND
Q.14 When all the inputs of a NAND gate are connected together, the resulting circuit is [1] a NOT gate
[2] an AND gate
[3] an OR gate
[4] a NOR gate
Q.13 The truth table shown below is for which of the following gates A 1 0 1 0
[1] NAND
[2] AND
NARAYANA
B 1 1 0 0
Y 0 1 1 1
[3] XOR
INSTITUTE
[4] NOR
180
LOGIC GATES
Q.12 Given below are four logic symbols. Those for OR, NOR and NAND gates are respectively. A
A
Y
B
B
(a)
A
Y
B
(b)
[1] a, d, c
A
Y
(c)
[2] d, a, b
Y
B
(d)
[3] a, c, d
[4] d, b, a
Q.11 In Boolean algebra Y = A + B means that [1] Y is the sum of A and B [2] Y exists when either A or B or both A and B exist [3] Y exists only when both A and B exist [4] Y exists when either A or B exists but not when both A and B exist Q.10 Which of the following relation is valid in Boolean algebra [1] A A Q.9
[2] A + A = 2A
0
[2] AND gate
[2] A.0
[4] NAND gate
A
[3] A A
[4] A.0
Which of the following Boolean expression is not correct [1] A.B A B
Q.6
[3] NOT gate
In Boolean algebra, which of the following is not equal to zero. [1] A. A
Q.7
[4] A A
Digital circuits can be made by repetitive use of [1] OR gate
Q.8
[3] A A 1
[2] A B A .B
[3] ( A.B).( A.B ) A B
[4] 1 1
1
You are giv en two circuits as shown in foll owing figure. The logic operation carried out by the two circuit are respectively A
A
Y
Y
B
[1] AND, OR
Y
B
[2] OR, AND
[3] NAND, OR
[4] NOR, AND
Q.5 An XOR gate produces an output only when its two inputs are [1] same Q.4
[3] low
[4] high
The output of gate is low when at least one of its input is high. This is true for [1] NOR
Q.3
[2] different [2] OR
[3] AND
The arrangement shown in figure performs the logic function of a/an ......... gate A
Y
B
[1] OR Q.2
[2] XOR
[3] NAND
[4] AND
The truth table given below if for A 0 0 1 1 [1] OR gate
Q.1
[4] NAND
B 0 1 0 1
[2] AND gate
Y 1 0 0 1 [3] XNOR gate
[4] XOR gate
The output of the given logic gate is 1 when inputs A, B and C are such that [1] A = 1, B = 0, C = 1 [2] A = 1, B = 1, C = 0
NARAYANA
[3] A = B = C = 0
INSTITUTE
[4] A = B = C = 1
181