C59 Exp1
C59 Exp1
1
Part A
AIM: To study and verify the truth table of various logic gates using ICs and realize
Boolean expressions using gates
Objectives:
1. To implement basic gates (AND, OR, NOT) and verify their truth table.
2. To implement universal gates (NAND, NOR) and verify their truth table 3.
To implement derived gates (XOR, XNOR) and verify their truth table.
Prerequisite: Basic knowledge of logic gates. Binary number system
APPARATUS REQUIRED:
THEORY:
Circuit that takes the logical decision and the process are called logic gates. Each
gate has one or more input but only one output.
OR, AND, and NOT are basic gates. NAND, NOR and X-OR are known as
Universal gates. Basic gates form these gates.
AND GATE:
The AND gate performs a logical multiplication commonly known as AND
function. The output is high when both the inputs are high. The output is low level when
any one of the inputs is low.
OR GATE:
The OR gate performs a logical addition commonly known as OR function. The
output is high when any one of the inputs is high. The output is low level when both the
inputs are low.
NOT GATE:
The NOT gate is called an inverter. The output is high when the input is low. The
output is low when the input is high.
NAND GATE:
The NAND gate is a contraction of AND-NOT. The output is high when both the
inputs are low and any one of the input is low. The output is low level when both the
inputs are high.
NOR GATE:
The NOR gate is a contraction of OR-NOT. The output is high when both inputs
are low. The output is low one or both inputs are high.
X-OR GATE:
The output is high when any of the inputs is high. The output is low when both the
inputs are low and both the inputs are high.
PROCEDURE:
1. Please refer virtual lab https://de-iitr.vlabs.ac.in/
http://vlabs.iitkgp.ernet.in/coa/
Every circuit Simulator of Terna LMS
AND GATE:
TRUTH TA
BLE:
A B AB
0 0 0
0 1 0
1 0 0
1 1 1
OR GATE:
SYMBOL: PIN DIAGRAM:
TRUTH TABLE:
A B A+B
0 0 0
0 1 1
1 0 1
1 1 1
NOT GATE:
SYMBOL: PIN DIAGRAM:
TRUTH TABLE:
INPUT OUTPUT
0 1
1 0
TRUTH TABLE:
NAND GATE:
NOR GATE:
SYMBOL: PIN DIAGRAM:
TRUTH TABLE:
PART B
(Students must submit the soft copy as per following segments within two
hours of the practical.The soft copy must be uploaded on the Blackboard or
emailed to the concerned lab in charge faculties at the end of the practical in
case the there is no Black board access available)
Grade:
OR GATE
AND GATE
NOT GATE
NOR GATE
NAND GATE
XOR GATE
XNOR GATE
Observations and learning: A logic gate can take two or more inputs but only produce one output.
The output of a logic gate depends on the combination of inputs and the logical operation that the
logic gate performs. Logic gates use Boolean algebra to execute logical processes. Logic gates are
found in nearly every digital gadget we use on a regular basis.
Conclusion:
Question of Curiosity
SAMPLE QUESTIONS:
1. What is universal gate?
Ans. Universal gates are those gates that can perform the tasks of other gates with minor
adjustments. The NAND gate and NOR gate are called Universal gates because they can
perform all the three essential functions of AND, OR and NOT gates.
A B Y A Y
0 1 0 0 1
1 0 0 1 0
Truth Table for NOT Gate
0 0 0
1 1 1
Truth Table for Input Input Output
AND Gate
A B Y
A B Y 0 1 0
0 0 0 1 0 0
0 1 1 1 1 0
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
Truth Table for NAND Gate
3. Draw pin diagrams of AND, OR, NOT, NOR, NAND Gate.
2. OR GATE
3. NOT GATE
4. NOR GATE
5. NAND GATE
4. Explain why NOR and NAND gate are called as universal gates
Ans. Theuniversalgateisthegatethatallowsallbasicgatestobeformed.
AndtheNANDgateisuniversalonlybecausealloftheotherbasicgates—theOR
gate,theANDgate,andtheNOTgate—canbeeasilydesignedfromit.
Nowlet'sstartprovinghowNANDandNORgatesarereferredtoasuniversalgates,
startingwiththe"NAND"gate.
UsingaNANDgateasaNOTgate
ThesymbolbelowdepictstheconstructionofaNOTgateusingaNANDgate.
Here,Aistheinput,andYistheoutputthatwillbeequaltoA'orA̅.IfAistheinput
andA̅istheoutput,whichisthereverseofA,Therefore,thisgateisworkinglikea NOTgate.
ANDgateusingaNANDgate
TodesignanANDgateusingNANDgates,wehavetousetwoNANDgatesasshown
inthefigurebelow:
Asyoucanseefromtheabovefigure,inthefirstNANDgate,therearetwoinputs,A
andB,whichgiveoneoutput,Y1,thatisequalto(A.B)'orA.B.Nowinthesecond
NANDgate,theY1isaninputthatgivestheY2asanoutputthatisequalto((A.B)')'.
Andasweknow,ifwedoublecomplementanynumber,theoriginalornatural
numberwillbeobtained,thatis,(A.B)anditwillbethefinaloutputproducedfrom
thesecondNANDgate.
Therefore,theinitialconclusionisthatwehaveprovidedtwoinputs,AandB,and
havegottentheoutput(A.B).ThisworksinthesamewayastheANDgate.
ORgateusingaNANDgate
TomakeanORgateusingNANDgates,wehavetoapplythreeNAND
gatesasshown inthefollowingfigure:
Asyoucansee,thefirstNANDgatehasAasaninput,whichbecomesA'atthe
output.AndfromthesecondNANDgate,wehaveBasaninputthatbecomesB'at
theoutput.Wenowhavetwoinputs(A'andB')thatoutputYatthethirdNANDgate.
AndYcontains(A'.B')'.
ByusingDeMorgan'ssecondtheorem,thatis:
(A.B)' = A'+B'
Therefore,byapplyingtheabovetheoremtotheoutput,whichis(A'.B')',weget:
Andaswealsoknow,whenwedoublecomplementthenumber,wewillgetthe
samenumberbutinuncomplementedform.Therefore,theaboveequation becomes:
(A'.B')' = A + B
Nowtheconclusionis,wehavetwoinputs,AandB,asseenfromtheabovefigure,
andwehaveoneoutputthatcontainsA+B.AndthisworksthesameastheORgate
works,sowehavesuccessfullymadetheORgateusingtheNANDgate.
wehavemadeallthreebasicgates,thatis,theAND,OR,andNOTgates,usingthe
NANDgate.Therefore,theNANDgateiscalledauniversalgate.
Nowlet’sdemonstratewhyaNORgateisoftenreferredtoasa"universalgate."
NOTgateusingaNORgate
HereisthefigurethatshowshowtodesignaNOTgateusingaNORgate:
Here,inputAbecomesoutputA'.Asaresult,itfunctionssimilarlytoaNOTgate.
ORgateusingaNORgate
TodesignanORgateusingaNORgate,wehavetousetwoNORgates.Concentrate
onthefollowingfigure:
Inthiscase,thefirstNORgate'sinputsareAandB,andtheoutputisY1,which
equals(A+B)'.AndtheinputatthesecondNORgateisY1or(A+B)',whichproduces
Y2atoutput,andY2isequalto((A+B)')'.Ifwedoublecomplementanynumber,then
thesamenumberorthenumberinuncomplementedformwillbeobtained.
Therefore,thefinaloutputwillbeA+B.
Andifwehavetwoinputs(AandB)thatproduceA+Battheoutput,thenthisworks
thesameasanORgate.Itmeanswehavesuccessfullydesignedorconstructedan
ORgateusingaNORgate.
ANDgateusingaNORgate
WehavetotakethehelpofthreeNORgatestodesignitinsuchawaythatittakes
inputandproducesoutputinthesamewaytheANDgatetakesandproduces.
Therefore,hereisthefigurethatsayseverythingaboutdesigninganANDgateusing
aNORgate:
Inthiscase,thefirstNORgate'sinputisA,andtheoutputisA'.AndthesecondNOR
gate'sinputisB,whichresultsinB'attheoutput.AndthethirdNORgate'stwo
inputsareA'andB',resultinginYastheoutput,whichisequalto(A'+B')'.
ByDeMorgan'sfirsttheorem:
(A+B)' = A'.B'
Therefore,byapplyingtheaboveDeMorgantheoremtothe
expression(A'+B')'whichisatthefinaloutputintheabovefigure:
(A'+B')' = (A')'.(B')'
canbesimplifiedas
(A'+B')' = (A.B)
Now,inthiscase,thetwoinputsareAandB,whichgivethefinaloutputA.Bthat
worksthesameastheANDgatedoes.Therefore,wehavesuccessfullydesignedan
ANDgateusingaNORgate.
Asyoucanseehere,wehavesuccessfullydesignedallthreebasicgates—AND,OR,
andNOT—throughtheNORgate;therefore,theNORgatecanbecalledauniversal gate.