100% found this document useful (1 vote)
175 views

Logic Gates Notes

Logic gates are digital circuits that take one or more inputs and produce one output. There are four main types of logic gates: AND, OR, NOT, and NAND. [1] The AND gate outputs 1 only if all inputs are 1. [2] The OR gate outputs 1 if any input is 1. [3] The NOT gate (inverter) outputs the opposite of its single input. [4] A NAND gate is a combination of an AND gate and a NOT gate, so its output is the inverse of the AND function. These basic gates can be combined to form more complex digital circuits.

Uploaded by

chirebvutawanda
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
175 views

Logic Gates Notes

Logic gates are digital circuits that take one or more inputs and produce one output. There are four main types of logic gates: AND, OR, NOT, and NAND. [1] The AND gate outputs 1 only if all inputs are 1. [2] The OR gate outputs 1 if any input is 1. [3] The NOT gate (inverter) outputs the opposite of its single input. [4] A NAND gate is a combination of an AND gate and a NOT gate, so its output is the inverse of the AND function. These basic gates can be combined to form more complex digital circuits.

Uploaded by

chirebvutawanda
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

LOGIC GATES

14.5 LOGIC GATES

Logic Gates

A digital circuit with one or more input signals but only one output signal is called
Logical gates.

Since a logic gate is a switching circuit (i.e. a digital circuit), its outputs can have only
one of the two possible states viz. either a high voltage (1) or a low voltage (0) - it is
either ON or OFF. Whether the output voltage of logic gate is high (1) or low (0) will
depend upon the condition at its input. Fig. shows the basic idea of a logic gate using
switches.

(I) When S1 and S2 are open, the bulb is OFF.


(II) When S1 is open and S2 closed, the bulb is OFF.
(III) When S2 is open and S1 closed, the bulb is OFF.
(IV) When both S1 and S2 are closed, the bulb is ON.
Note: The output (OFF or ON) depends upon the conditions at the input.
The four possible combination of switches S1 and S2 are shown in the table below.
S1 S2 Bulb S1 S2 Bulb

open open OFF 0 0 0


open closed OFF 0 1 0
closed open OFF 1 0 0
closed closed ON 1 1 1
It is clear that when either of the switches (S 1 or S2) or both are open, the bulb is
OFF. In binary language , when either of the inputs or both the inputs are low (0), the
output is low. When both switches are closed, the bulb is ON, It is a usual practice to

PHYSICS MADE SIMPLE >>> MR TEE 2018 Page 1


LOGIC GATES

show the conditions at the input and output of a logic gate in the binary form as
shown in the table above. Such a table is calls truth table.

The term "logic" is usually used to refer to a decision-making process. A logic gate
makes logic decision regarding the existence of output depending upon the nature of
the input. Hence such circuits are called logic circuit.

AND Gate

The AND gate is a logic gate that has two or more inputs but only one output.
However, the output Y of an AND gates is HIGH when all inputs are HIGH. The
output Y of an AND gate is LOW if any or all the inputs are LOW.

It is called AND gate because the output is high only when all the inputs are high.
For this reason, the AND gate is sometimes called "any or nothing gate". For
example, consider a 2-input AND gate. The output y will be high when both the input
are high.

Fig (a) Fig (b)

AND gate Operation : Fig (a) shown one way to build a 2-inputs AND gate while Fig
(b) shows its simplified schematic diagram. There are only four input-output
possibilities.

(I) When both A and B are connected to ground, both diodes (D1 and D2) are forward
biased and hence they conduct current. Consequently, the two diodes are grounded
and output voltage is zero. In terms of binary, when A = 0 and B = 0, then Y = 0 as
shows in the truth table.

(II) When A is connected to ground and B connected to the positive terminal of the
battery, diode D1 is forward biased and diode D2 will not conduct. Therefore diode D1
conducts and is grounded. Again output voltage will be zero. In terms of binary,
When A = 0 and B = 1,then Y = 0 as shows in the truth table. (III) When both B is
connected to the ground and A connected to the positive terminal of the battery, the
roles of diodes are interchanged. Now diode D2 will conduct while diode D1 dose not
conduct. As a result, diode D2 is grounded and again output voltage is zero. In binary
terms when A = 1 and B = 0 then Y = 0 as shows in the truth table.

(IV) When both A and B are connected to the positive terminal of the battery, both
diodes don't conduct. Now, the output voltage is +5V because there is no current
through RL.
It is clear from the truth table that for AND gate, the output is high if all the input are

PHYSICS MADE SIMPLE >>> MR TEE 2018 Page 2


LOGIC GATES

high. However, the output is low if any or all input are low. Fig (c) shows the logic
symbol of the AND gate. This is the symbol you will memories and use from now on
for AND gates.

A B Y

0 0 0
0 1 0
1 0 0
1 1 1
Truth Table

Boolean Expression: The Boolean expression for AND function is

A.B=Y

where the multiplication " . (dot)" stands for the AND operation. The adjoining table
shows the possible for the inputs. The table tells us 0 AND with any variable equals
0.1 AND with 1 equals one. The And function can be summed up as under:

A.B Y
0 AND with 0 equals 0
0.0 0 0 AND with 1 equals 0
0.1 0 1 AND with 1 equals 1
1.0 0
1.1 1
Fig (c) Adjoining table

OR Gate

An OR gate is a logic gate that has two or more inputs but only one output. However,
the output Y of an OR gates is LOW when all inputs are LOW. The output Y of an
OR gate is HIGH if any or all the inputs are HIGH.

It is called OR gate because the output is high if any or all the inputs are high. For
the same reason, an OR gate is sometimes called "any or all gate". For example,
consider a 2-input OR gate. The output y will be high if either or both input are high.

Fig (a) Fig (b)

OR gate Operation: Fig (a) shown one way to build a 2-inputs OR gate while Fig (b)
shows its simplified schematic diagram. The input voltage are labelled as A and B

PHYSICS MADE SIMPLE >>> MR TEE 2018 Page 3


LOGIC GATES

corresponds to 0 state (LOW level). The positive terminal of the battery (+5V)
corresponds to 1 state HIGH level). There are only four input-output possibilities.

(I) When both A and B are connected to ground, both diodes are non-conducting.
Hence the output voltage is ideally zero (lo voltage). In terms of binary, when A = 0
and B = 0, then Y = 0 as shows in the truth table.

(II) When A is connected to ground and B connected to the positive terminal of the
battery, diode D2 is forward biased and diode D1 is non-conducting. Therefore diode
D2 conducts and the output voltage is ideally +5V. In terms of binary, When A = 0
and B = 1, then Y = 1 as shows in the truth table.

(III) When both A and B are connected to the positive terminal of the battery and B to
the ground, diode D1 is on and diode D2 is off. Again the output voltage is +5V. In
binary terms when A = 1 and B = 0 then Y = 1 as shows in the truth table.

(IV) When both A and B are connected to the positive terminal of the battery, both
diodes are on. Since the diodes are in parallel, the output voltage is +5V. In binary
terms, when A = 1 and B = 1 ,then Y = 1 as shows in the truth table.

A B Y

0 0 0
0 1 1
1 0 1
1 1 1
Truth Table

IT is clear from the truth table that for OR gate, the output is high if any or all of the
inputs are high. The only way to get a low output is by having all inputs low. Fig (C)
shows the logical symbol of OR gate. Note that the symbol has curved line at the
input.

Fig (c)

Boolean Expression : The algebra used to symbolically describe logic function is


called Boolean algebra. The "+" sign in Boolean algebra refers to the logical OR
function. The Boolean expression for OR function is
A + B = Y where "+" is OR symbol

A+ Y
B
0+0 0
0+1 1
1+0 1
1+1 1
Adjoining table

PHYSICS MADE SIMPLE >>> MR TEE 2018 Page 4


LOGIC GATES

The adjoining table shows possibilities for the inputs. According to this table, when 0
is OR with 0 , the result equals 0. Also, any variable OR with 1 equals 1.The OR
function can be summed up as under:
0 OR with 0 equals 0
0 OR with 1 equals 1
1 OR with 1 equals 1

NOT Gate or Inverter

The NOT gate or Inverter is the simplest of all logic gates. It has only one input one
output. Where the output Y opposite of the input. The NOT gate is often called
inverter because it inverts the input.

Fig (b)

Fig (a)

Fig (a) shows a typical inverter circuit. When A is connected to ground, the base of
transistor Q1 will become negative. The negative potential cause the transistor to cut
off and large positive voltage is applied at A, the base of the transistor will become
positive, causing the transistor to conduct heavily. Therefore, the output voltage is
zero. In binary terms, when A = 1, Y = 0. as shows truth table for an inverter. It is
clear from the truth table that whatever the input to the inverter, the output assumes
opposite polarity. If the input is 0, the output will be 1: if the input is 1,the output will
be 0.

A Y
0 1
1 0
Truth Table

Fig (b) shows the logic symbol for NOT gate or inverter. Note that small bubble on
the inverter symbol represents inversion. The Boolean expression for NOT function
is

Y=

Note that bar above the input A represents inversion.


If A = 0, then Y = or Y = 1
If A = 1, then Y = or Y = 0

COMBINATION OF BASIC LOGIC GATES

PHYSICS MADE SIMPLE >>> MR TEE 2018 Page 5


LOGIC GATES

The OR, AND and NOT gates are the three basic circuits that make up all digital
circuits. We shall discuss a few combinations of these basic circuits.
(I) NAND Gate: It is combination of AND gate is connected to the input of a NOT
gate as shown in Fig. (a). Clearly, the output of a NAND gate is opposite to the AND
gate. This is illustrated in the truth table for the NAND gate. Note that truth table for
NAND gate is developed by inverting the output of the AND gate.
The Boolean expression for NAND function is

This Boolean expression can be read as Y = not A . B. TO perform the Boolean


algebra operation, First the input must be AND and then the inversion is performed.
Note that output from NAND gate is always 1 excepted when all of the input are
1.Fig. (b) shows the logic symbol for a NAND gate. The title bubble (small circle) on
the right end of the symbol means to invert the AND.

Fig. (a) Fig. (b)


Inputs Outputs
A B AND(Y') NAND(Y)
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
Truth Table of NAND

(II) NOR Gate: It is a combination of OR gate and NOT gate. In other words, output
of OR gate is connected to the input of a NOT gate as shown in Fig. (c). Note that
output of OR gate is inverted to form NOR gate. This is illustrated in the truth table
for NOR gate. It is clear that truth table for NOR gate is developed by inverting the
outputs of the OR gate.

Fig. (c) Fig. (d)


Inputs Outputs
A B OR(Y') NOR(Y)
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
Truth Table of NOR

The Boolean expression for NOR function is:

PHYSICS MADE SIMPLE >>> MR TEE 2018 Page 6


LOGIC GATES

The Boolean expression can be read as Y = not A or B. To perform the Boolean


algebra operation, first the input must be OR and then inversion is performed. Note
that output from a NOR gate is high(1) only when all the inputs are low (0). If any of
the inputs are high (1) the output is low (0). fig. (d) shows the logic symbol for a NOR
gate. The bubble (small circle) at the Y output indicates inversion.

Exclusive OR Gate

The name exclusive OR Gate is usually shortened to XOR gate. The XOR gate can
be obtained by using OR, AND and NOT gates as shown in Fig (a).

Fig (a) Fig (b)


Inputs Outputs
A B OR XOR
0 0 0 0
1 0 1 1
0 1 1 1
1 1 1 0
Truth Table of XOR

Shows the truth table for XOR gate. The table shows that the output is HIGH (1) if
any but not all of the inputs are High (1).This exclusive feature eliminates the
similarly to the OR gate. The OR gate truth table is also given so that you can
compare the OR gate truth table with XOR gate truth table. The logic symbol for
XOR gate is shown in Fig. (b). Note that the symbol is similar to that of OR gate
except for the additional curved line at the input side.

The Logic operations in the circuit are as under:

A B . B = Y' A . = Y" Y = Y' + Y"


0 0 1 1 0 0 0
1 0 0 1 0 1 1
0 1 1 0 1 0 1
1 1 0 0 0 0 0

Note that 0 ANDed with 1 is 0 and AND with 1 is 1.

PHYSICS MADE SIMPLE >>> MR TEE 2018 Page 7

You might also like