SlideShare a Scribd company logo
1 of 8
R.S.D.Academy, session 2013 -14
The Three Basic Logic Gates
Much of a computer’s hardware is comprised of digital logic circuits. Digital logic
circuits are built from just a handful of primitive elements, called logic gates,
combined in various ways.
In a digital logic circuit, only two values may be present. The values may be and +
5 volts. Or the values may be 0.5 and 3.5 volts. Or the values may be… you get the
picture. To allow consideration of all of these possibilities, we will say that digital
logic circuits allow the presence of two logical values: 0 and 1. 5−
So, signals in a digital logic circuit take on the values of 0 or 1. Logic gates are
devices which compute functions of these binary signals.
The AND Gate
Consider the circuit below which consists of a battery, a light, and two switches in
series:
When will the light turn on? It should be clear that the light will turn on only if
both switch S1 and switch S2 are shut.
It is quite likely that you encounter the and operation in some shape or form
hundreds of times each day. Consider the simple action of withdrawing funds from
R.S.D.Academy, session 2013 -14
your checking account at an ATM. You will only be able to complete the
transaction if you have a checking account and you have money in it. The ATM
will only permit the transaction if you have your ATM card and you enter your
correct 4-digit PIN. To enter the correct PIN, you have to enter the first digit
correctly and enter the second digit correctly and enter the third digit correctly and
enter the fourth digit correctly.
Returning to the circuit above, we can represent the light's operation using a table:
The switch is a binary device: it can be open or closed. Let’s represent these two
states as 0 and 1. Likewise, the light is a binary device with two states: off and on,
which we will represent as 0 and 1. Rewriting the table above with this notation,
we have:
This table, which displays the output for all possible combinations of the input, is
termed the truth table for the AND operation. In a computer, this and
R.S.D.Academy, session 2013 -14
functionality is implemented with a circuit called an AND gate. The simplest AND
gate has two inputs and one output and is represented pictorially by the symbol:
where the inputs have been labeled a and b, and the output has been labeled c. If
both inputs are 1 then the output is 1. Otherwise, the output is 0.
We represent the and operation by using either the multiplication symbol (i.e., “ ∙
“) or by writing the inputs together. Thus, for the AND gate shown above, we
would write the output c as or as c = ab. This would be pronounced: “c = a and b.”
cab=
The truth table for the AND gate is shown below. The output c = ab is equal to 1 if
and only if (iff) a is 1 and b is 1. Otherwise, the output is 0.
∧ cab=∧
AND gates can have more than one input (however, an AND gate always has just a
single output). Let’s consider a three-input AND gate:
R.S.D.Academy, session 2013 -14
The expression for z is . In words, theoutput z = 1 if and only if w = 1 and x = 1 and
y = 1. Otherwise z = 0.
Example
Write the truth table for the 3-input AND gate.
Solution:
We begin by recognizing that we have three inputs and one output, so, labeling the
inputs as w, x and y, and the output as z, the heading of the truth table will be:
combination is w = 1, x = 0 and y =1. Another possible input combination is w = 0,
x = 1 and y =1. Each of these possibilities will be represented as a line in the truth
table, with the output z indicated for each input combination.
So, we must consider: How many different input combinations will exist if we
have three inputs? Note that since each input combination will be presented on one
line of the truth table, the foregoing question can be restated as: How many lines
will be in a truth table with 3 inputs?
The answer is provided by the Multiplication Rule, which states that if an
operation consists of k steps and the first step can be performed in ways and the
R.S.D.Academy, session 2013 -14
second step can be performed in and the third step can be performed in ways, and
so forth, then the entire operation can be performed in different ways. 1n 2n 3n
123knnnn
Applying the multiplication rule to our specific example, the “steps” correspond to
the inputs, of which there are three (i.e., k = 3). The first input can take on two
different values, 0 or 1, so .n1=2 Likewise, the second and third inputs can each
take on two different values, so . n2=2 , n3=2
So, how can we present the truth table in an organized manner?
The answer is to start by considering the three inputs to be a
Finally, we recall that for this three input AND gate, the output z = 1 if and only if
w = 1 and x = 1 and y = 1. Otherwise z = 0. Thus, the truth table is:
R.S.D.Academy, session 2013 -14
In general, a logic gate with k inputs will have possible input combinations. 2k
Example
How many lines will be in the truth table for a 6-input AND gate?
Solution:
Note that the k-input AND gate can be described in three different ways:
The OR Gate
Now consider the circuit shown below, that has 2 switches in parallel.
It is evident that the light will turn on when either switch S1 is shut or switch S2 is
shut or both are shut.
It is quite likely that you encounter the or operation in some shape or form
hundreds of times each day. Consider the simple action of sitting on your couch at
home at two in the morning studying for your Digital Logic class. Your phone will
ring if you get a call from Alice or from Bob. Your home’s security alarm will go
off if the front dooropens or the back door opens. You will drink a cup of coffee if
you are drowsy or you are thirsty.
We can represent the light's operation using a table
R.S.D.Academy, session 2013 -14
Changing the words open and off to 0 and the words shutand on to 1 and the
table becomes:
This is the truth table for the OR operation. This or functionality is implemented
with a circuit called an OR gate. The simplest OR gate has two inputs and one
output and is represented pictorially by the symbol:
If either or bothinputs are 1, the output is 1. Otherwise, the output is 0.
We represent the or operation by using the addition symbol. Thus, for the OR gate
above, we would write the output c as c = a + b. This would be pronounced:“c = a
or b.”
The truth table for the OR gate is shown below. The output is 1 if a is 1 or b is 1;
otherwise, the output is 0.
R.S.D.Academy, session 2013 -14

More Related Content

What's hot

Octal to binary encoder
Octal to binary encoderOctal to binary encoder
Octal to binary encoderAjay844
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Frankie Jones
 
Physics investigatory project { LOGIC GATES} CLASS XII
Physics investigatory project  { LOGIC GATES} CLASS XIIPhysics investigatory project  { LOGIC GATES} CLASS XII
Physics investigatory project { LOGIC GATES} CLASS XIIavneesh1234
 
Lecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuitLecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuitKMJ Science Computer
 
Physics investigatory project
Physics investigatory projectPhysics investigatory project
Physics investigatory projectAbhinav Kumar
 
Physics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesPhysics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesbiswanath dehuri
 
Physics Investigatory project Class 12 Logic Gates
Physics Investigatory project Class 12 Logic GatesPhysics Investigatory project Class 12 Logic Gates
Physics Investigatory project Class 12 Logic GatesRaghav Rathi
 
Electronic Circuits
Electronic  CircuitsElectronic  Circuits
Electronic Circuitsgavhays
 
Introduction to logic gate
Introduction to logic gateIntroduction to logic gate
Introduction to logic gatechauhankapil
 
physics investigatory on logic gates
physics investigatory on logic gatesphysics investigatory on logic gates
physics investigatory on logic gatesMoviesBuzz1
 
Project on logic And Gate
Project on logic And GateProject on logic And Gate
Project on logic And GateAjay Yadav
 
All About Boolean Algebra DLD.
All About Boolean Algebra DLD.All About Boolean Algebra DLD.
All About Boolean Algebra DLD.Zain Jafri
 
FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...
FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...
FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...Arti Parab Academics
 
physics investigatory project class 12 on logic gates ,boolean algebra
physics investigatory project class 12 on logic gates ,boolean algebraphysics investigatory project class 12 on logic gates ,boolean algebra
physics investigatory project class 12 on logic gates ,boolean algebrasukhtej
 
Digital Electronics Logic gates
Digital Electronics Logic gatesDigital Electronics Logic gates
Digital Electronics Logic gatesMD Mahadi Hasan
 

What's hot (20)

Octal to binary encoder
Octal to binary encoderOctal to binary encoder
Octal to binary encoder
 
Ch 5 boolean logic
Ch 5 boolean logicCh 5 boolean logic
Ch 5 boolean logic
 
Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)Chapter 2 Boolean Algebra (part 2)
Chapter 2 Boolean Algebra (part 2)
 
Logic gates 07 11-2014
Logic gates 07 11-2014Logic gates 07 11-2014
Logic gates 07 11-2014
 
Physics investigatory project { LOGIC GATES} CLASS XII
Physics investigatory project  { LOGIC GATES} CLASS XIIPhysics investigatory project  { LOGIC GATES} CLASS XII
Physics investigatory project { LOGIC GATES} CLASS XII
 
Lecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuitLecture 2.4 logic_gate_&_simple_logic_circuit
Lecture 2.4 logic_gate_&_simple_logic_circuit
 
Physics investigatory project
Physics investigatory projectPhysics investigatory project
Physics investigatory project
 
Physics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gatesPhysics investigatory project for class 12 logic gates
Physics investigatory project for class 12 logic gates
 
Physics Investigatory project Class 12 Logic Gates
Physics Investigatory project Class 12 Logic GatesPhysics Investigatory project Class 12 Logic Gates
Physics Investigatory project Class 12 Logic Gates
 
Physic investigatory
Physic investigatoryPhysic investigatory
Physic investigatory
 
Electronic Circuits
Electronic  CircuitsElectronic  Circuits
Electronic Circuits
 
Introduction to logic gate
Introduction to logic gateIntroduction to logic gate
Introduction to logic gate
 
physics investigatory on logic gates
physics investigatory on logic gatesphysics investigatory on logic gates
physics investigatory on logic gates
 
Project on logic And Gate
Project on logic And GateProject on logic And Gate
Project on logic And Gate
 
Logic gates
Logic gatesLogic gates
Logic gates
 
All About Boolean Algebra DLD.
All About Boolean Algebra DLD.All About Boolean Algebra DLD.
All About Boolean Algebra DLD.
 
FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...
FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...
FYBSC IT Digital Electronics Unit II Chapter II Minterm, Maxterm and Karnaugh...
 
physics investigatory project class 12 on logic gates ,boolean algebra
physics investigatory project class 12 on logic gates ,boolean algebraphysics investigatory project class 12 on logic gates ,boolean algebra
physics investigatory project class 12 on logic gates ,boolean algebra
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Digital Electronics Logic gates
Digital Electronics Logic gatesDigital Electronics Logic gates
Digital Electronics Logic gates
 

Similar to Logic gates

Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1Techglyphs
 
Practica 4 algebra booleana por compuertas lógicas.
Practica 4 algebra booleana por compuertas lógicas.Practica 4 algebra booleana por compuertas lógicas.
Practica 4 algebra booleana por compuertas lógicas.JavierDeJesusCamacho1
 
B sc3 unit 3 boolean algebra
B sc3 unit 3 boolean algebraB sc3 unit 3 boolean algebra
B sc3 unit 3 boolean algebraMahiboobAliMulla
 
Ass.(2)applications of logic u.s d.m
Ass.(2)applications of logic u.s d.mAss.(2)applications of logic u.s d.m
Ass.(2)applications of logic u.s d.mSyed Umair
 
1,basic and derived logic gates.pdf
1,basic and derived logic gates.pdf1,basic and derived logic gates.pdf
1,basic and derived logic gates.pdfDamotTesfaye
 
Simplification of Circuits.pdf
Simplification of Circuits.pdfSimplification of Circuits.pdf
Simplification of Circuits.pdfMaryJacob24
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxRithinA1
 
296779866 c-b-s-e-class-12-physics-project-on-logic-gates
296779866 c-b-s-e-class-12-physics-project-on-logic-gates296779866 c-b-s-e-class-12-physics-project-on-logic-gates
296779866 c-b-s-e-class-12-physics-project-on-logic-gatesAnuragSharma530
 
PHYSICS PRACTICAL PROJECT (1).pdf
PHYSICS PRACTICAL PROJECT (1).pdfPHYSICS PRACTICAL PROJECT (1).pdf
PHYSICS PRACTICAL PROJECT (1).pdfOmChaubey7
 
Digital circuits
Digital circuitsDigital circuits
Digital circuitsmvennek
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architectureNzb sirji
 

Similar to Logic gates (20)

Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
 
DE notes
DE notesDE notes
DE notes
 
Practica 4 algebra booleana por compuertas lógicas.
Practica 4 algebra booleana por compuertas lógicas.Practica 4 algebra booleana por compuertas lógicas.
Practica 4 algebra booleana por compuertas lógicas.
 
B sc3 unit 3 boolean algebra
B sc3 unit 3 boolean algebraB sc3 unit 3 boolean algebra
B sc3 unit 3 boolean algebra
 
Ass.(2)applications of logic u.s d.m
Ass.(2)applications of logic u.s d.mAss.(2)applications of logic u.s d.m
Ass.(2)applications of logic u.s d.m
 
1,basic and derived logic gates.pdf
1,basic and derived logic gates.pdf1,basic and derived logic gates.pdf
1,basic and derived logic gates.pdf
 
Simplification of Circuits.pdf
Simplification of Circuits.pdfSimplification of Circuits.pdf
Simplification of Circuits.pdf
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
296779866 c-b-s-e-class-12-physics-project-on-logic-gates
296779866 c-b-s-e-class-12-physics-project-on-logic-gates296779866 c-b-s-e-class-12-physics-project-on-logic-gates
296779866 c-b-s-e-class-12-physics-project-on-logic-gates
 
PHYSICS PRACTICAL PROJECT (1).pdf
PHYSICS PRACTICAL PROJECT (1).pdfPHYSICS PRACTICAL PROJECT (1).pdf
PHYSICS PRACTICAL PROJECT (1).pdf
 
logic gates By ZAK
logic gates By ZAKlogic gates By ZAK
logic gates By ZAK
 
logic gates
logic gateslogic gates
logic gates
 
Chapter+13.ppt
Chapter+13.pptChapter+13.ppt
Chapter+13.ppt
 
Bt0064
Bt0064Bt0064
Bt0064
 
B T0064
B T0064B T0064
B T0064
 
B sc ii sem unit 2(b) ba
B sc ii sem unit 2(b) baB sc ii sem unit 2(b) ba
B sc ii sem unit 2(b) ba
 
Digital circuits
Digital circuitsDigital circuits
Digital circuits
 
Class 12th Logic Gates
Class 12th Logic GatesClass 12th Logic Gates
Class 12th Logic Gates
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
Logic gates i & ii
Logic gates i & iiLogic gates i & ii
Logic gates i & ii
 

Logic gates

  • 1. R.S.D.Academy, session 2013 -14 The Three Basic Logic Gates Much of a computer’s hardware is comprised of digital logic circuits. Digital logic circuits are built from just a handful of primitive elements, called logic gates, combined in various ways. In a digital logic circuit, only two values may be present. The values may be and + 5 volts. Or the values may be 0.5 and 3.5 volts. Or the values may be… you get the picture. To allow consideration of all of these possibilities, we will say that digital logic circuits allow the presence of two logical values: 0 and 1. 5− So, signals in a digital logic circuit take on the values of 0 or 1. Logic gates are devices which compute functions of these binary signals. The AND Gate Consider the circuit below which consists of a battery, a light, and two switches in series: When will the light turn on? It should be clear that the light will turn on only if both switch S1 and switch S2 are shut. It is quite likely that you encounter the and operation in some shape or form hundreds of times each day. Consider the simple action of withdrawing funds from
  • 2. R.S.D.Academy, session 2013 -14 your checking account at an ATM. You will only be able to complete the transaction if you have a checking account and you have money in it. The ATM will only permit the transaction if you have your ATM card and you enter your correct 4-digit PIN. To enter the correct PIN, you have to enter the first digit correctly and enter the second digit correctly and enter the third digit correctly and enter the fourth digit correctly. Returning to the circuit above, we can represent the light's operation using a table: The switch is a binary device: it can be open or closed. Let’s represent these two states as 0 and 1. Likewise, the light is a binary device with two states: off and on, which we will represent as 0 and 1. Rewriting the table above with this notation, we have: This table, which displays the output for all possible combinations of the input, is termed the truth table for the AND operation. In a computer, this and
  • 3. R.S.D.Academy, session 2013 -14 functionality is implemented with a circuit called an AND gate. The simplest AND gate has two inputs and one output and is represented pictorially by the symbol: where the inputs have been labeled a and b, and the output has been labeled c. If both inputs are 1 then the output is 1. Otherwise, the output is 0. We represent the and operation by using either the multiplication symbol (i.e., “ ∙ “) or by writing the inputs together. Thus, for the AND gate shown above, we would write the output c as or as c = ab. This would be pronounced: “c = a and b.” cab= The truth table for the AND gate is shown below. The output c = ab is equal to 1 if and only if (iff) a is 1 and b is 1. Otherwise, the output is 0. ∧ cab=∧ AND gates can have more than one input (however, an AND gate always has just a single output). Let’s consider a three-input AND gate:
  • 4. R.S.D.Academy, session 2013 -14 The expression for z is . In words, theoutput z = 1 if and only if w = 1 and x = 1 and y = 1. Otherwise z = 0. Example Write the truth table for the 3-input AND gate. Solution: We begin by recognizing that we have three inputs and one output, so, labeling the inputs as w, x and y, and the output as z, the heading of the truth table will be: combination is w = 1, x = 0 and y =1. Another possible input combination is w = 0, x = 1 and y =1. Each of these possibilities will be represented as a line in the truth table, with the output z indicated for each input combination. So, we must consider: How many different input combinations will exist if we have three inputs? Note that since each input combination will be presented on one line of the truth table, the foregoing question can be restated as: How many lines will be in a truth table with 3 inputs? The answer is provided by the Multiplication Rule, which states that if an operation consists of k steps and the first step can be performed in ways and the
  • 5. R.S.D.Academy, session 2013 -14 second step can be performed in and the third step can be performed in ways, and so forth, then the entire operation can be performed in different ways. 1n 2n 3n 123knnnn Applying the multiplication rule to our specific example, the “steps” correspond to the inputs, of which there are three (i.e., k = 3). The first input can take on two different values, 0 or 1, so .n1=2 Likewise, the second and third inputs can each take on two different values, so . n2=2 , n3=2 So, how can we present the truth table in an organized manner? The answer is to start by considering the three inputs to be a Finally, we recall that for this three input AND gate, the output z = 1 if and only if w = 1 and x = 1 and y = 1. Otherwise z = 0. Thus, the truth table is:
  • 6. R.S.D.Academy, session 2013 -14 In general, a logic gate with k inputs will have possible input combinations. 2k Example How many lines will be in the truth table for a 6-input AND gate? Solution: Note that the k-input AND gate can be described in three different ways: The OR Gate Now consider the circuit shown below, that has 2 switches in parallel. It is evident that the light will turn on when either switch S1 is shut or switch S2 is shut or both are shut. It is quite likely that you encounter the or operation in some shape or form hundreds of times each day. Consider the simple action of sitting on your couch at home at two in the morning studying for your Digital Logic class. Your phone will ring if you get a call from Alice or from Bob. Your home’s security alarm will go off if the front dooropens or the back door opens. You will drink a cup of coffee if you are drowsy or you are thirsty. We can represent the light's operation using a table
  • 7. R.S.D.Academy, session 2013 -14 Changing the words open and off to 0 and the words shutand on to 1 and the table becomes: This is the truth table for the OR operation. This or functionality is implemented with a circuit called an OR gate. The simplest OR gate has two inputs and one output and is represented pictorially by the symbol: If either or bothinputs are 1, the output is 1. Otherwise, the output is 0. We represent the or operation by using the addition symbol. Thus, for the OR gate above, we would write the output c as c = a + b. This would be pronounced:“c = a or b.” The truth table for the OR gate is shown below. The output is 1 if a is 1 or b is 1; otherwise, the output is 0.