SlideShare a Scribd company logo
Digital logic gates
Logic gates
Computer and other digital devices are sometimes
looked upon by the general public as magical.
Actually digital electronic devices are extremely
logical in their operations.
The basic building block of any digital circuit is a
logic gate.
A logic gate is an electronic circuit which makes
logical decision.
It has one or more inputs and only one output.
The output signal appears only for certain
combinations of the input signals.
Logic gate
In computer, logic gates are the
building blocks.
Most of the functions in a computer,
with the exception of certain types of
memory, are implemented with logic
gates used on a very large scale.
For example a microprocessor, which is
made up of hundreds of thousands or
even millions of logic gates.
Logic gates
Logic gates can be constructed by using
simple switches, relays, vacuum tubes,
transistors and diodes or ICs
Because of their availability , wide use and
low cost.
ICs will be used to construct digital
circuits.
A variety of logic gates are available in all
logic families including Transistor–
transistor logic (TTL) and CMOS.
Positive and Negative logic gate
In computing systems, the binary digits “0 and 1”
represent two possible states of a circuit or
device.
It makes difference if these two states are
referred to “Off and On” or “Closed and Open”
or “Low and High” or “Minus and Plus” or
“False and True” depending on the
circumstances.
Positive and Negative
logic gate
o Positive and Negative Logic
 In positive logic, 1 represents:
1. An ON circuit
2. A CLOSED switch
3. A HIGH voltage
4. A PLUS sign
5. A TRUE statement
o Positive and Negative Logic
 Consequently, 0
represents:
1. An OFF circuit
2. A OPEN switch
3. A LOW voltage
4. A MINUS sign
5. A FALSE statement
Example
o Suppose, a digital system has two voltage levels of “0V and 5V”.
1. If we say that digit 1 stands for 5V and digit 0 stands for 0V,
then we have positive logic system.
2. If, on other hand, we decide that 1 should stand for 0V and 0
stands for 5V, then we will have a negative logic system.
o Note: It is not necessary that a 0 has to be represented by 0V, it can be
any voltage level.
o The main concept is that, in positive logic, the more positive of the two
quantities represents the 1 and in negative logic, the more negative voltage
represents 0.
Types of logic Gates
o There are seven types logic gates whose function is to perform logical operations.
These are (note the use of capital letters to name the gates):
1. AND gate
2. OR gate
3. NOT gate
4. NAND gate
5. NOR gate
6. XOR gate
7. XNOR gate
The inverter performs the Boolean NOT operation. When the input is
LOW, the output is HIGH; when the input is HIGH, the output is LOW.
The Inverter
A X
Input
A X
Output
LOW (0) HIGH (1)
HIGH (1) LOW(0)
The NOT operation (complement) is shown with an overbar. Thus, the
Boolean expression for an inverter is X = A.
The Inverter
Example waveforms:
A
X
A X
A group of inverters can be used to form the 1’s complement of a binary
number:
Binary number
1’s complement
1 0 0 0 1 1 0
1
0 1 1 1 0 0 1
0
The AND gate produces a HIGH output when all inputs are HIGH;
otherwise, the output is LOW. For a 2-input gate, the truth table is
The AND Gate
The AND operation is usually shown with a dot between the variables
but it may be implied (no dot). Thus, the AND operation is written as X =
A .B or X = AB.
Inputs
A B X
Output
0 0
0 1
1 0
1 1
0
0
0
1
A
B
X &
A
B
X
Example waveforms:
A
X
The AND operation is used in computer programming as a selective mask.
If you want to retain certain bits of a binary number but reset the other
bits to 0, you could set a mask with 1’s in the position of the retained bits.
The AND Gate
A
B
X
B
00000011
If the binary number 10100011 is ANDed with the mask
00001111, what is the result?
&
A
B
X
The OR gate produces a HIGH output if any input is HIGH; if all inputs
are LOW, the output is LOW. For a 2-input gate, the truth table is
The OR Gate
The OR operation is shown with a plus sign (+) between the variables.
Thus, the OR operation is written as X = A + B.
Inputs
A B X
Output
0 0
0 1
1 0
1 1
0
1
1
1
A
B
X A
B
X
≥ 1
Example waveforms:
A
X
The OR operation can be used in computer programming to set
certain bits of a binary number to 1.
The OR Gate
B
A
B
X A
B
X
≥ 1
ASCII letters have a 1 in the bit 5 position for lower case
letters and a 0 in this position for capitals. (Bit positions
are numbered from right to left starting with 0.) What will
be the result if you OR an ASCII letter with the 8-bit mask
00100000?
The resulting letter will be lower case.
The NAND gate produces a LOW output when all inputs are HIGH;
otherwise, the output is HIGH. For a 2-input gate, the truth table is
The NAND Gate
Inputs
A B X
Output
0 0
0 1
1 0
1 1
1
1
1
0
A
B
X A
B
X
&
The NAND operation is shown with a dot between the variables and an
overbar covering them. Thus, the NAND operation is written as X = A .B
(Alternatively, X = AB.)
Example waveforms:
A
X
The NAND gate is particularly useful because it is a “universal” gate – all
other basic gates can be constructed from NAND gates.
The NAND Gate
B
How would you connect a 2-input NAND gate to form a
basic inverter?
A
B
X A
B
X
&
The NOR gate produces a LOW output if any input is HIGH; if all
inputs are HIGH, the output is LOW. For a 2-input gate, the truth
table is
The NOR Gate
Inputs
A B X
Output
0 0
0 1
1 0
1 1
1
0
0
0
A
B
X A
B
X
≥1
The NOR operation is shown with a plus sign (+) between the variables
and an overbar covering them. Thus, the NOR operation is written as X =
A + B.
Example waveforms:
A
X
The NOR operation will produce a LOW if any input is HIGH.
The NOR Gate
B
When is the LED is ON for the circuit shown?
The LED will be on when any
of the four inputs are HIGH.
A
C
B
D
X
330W
+5.0 V
A
B
X A
B
X
≥1
The XOR gate produces a HIGH output only when both inputs are at
opposite logic levels. The truth table is
The XOR Gate
Inputs
A B X
Output
0 0
0 1
1 0
1 1
0
1
1
0
A
B
X A
B
X
= 1
The XOR operation is written as X = AB + AB. Alternatively, it can be
written with a circled plus sign between the variables as X = A + B.
X
The XOR Gate
Example waveforms:
A
X
Notice that the XOR gate will produce a HIGH only when exactly
one input is HIGH.
The XOR Gate
B
If the A and B waveforms are both inverted for the
above waveforms, how is the output affected?
There is no change in the
output.
A
B
X A
B
X
= 1
The XNOR gate produces a HIGH output only when both inputs are at
the same logic level. The truth table is
The XNOR Gate
Inputs
A B X
Output
0 0
0 1
1 0
1 1
1
0
0
1
A
B
X A
B
X
The XNOR operation shown as X = AB + AB. Alternatively, the XNOR
operation can be shown with a circled dot between the variables. Thus, it
can be shown as X = A . B.
= 1
Example waveforms:
A
X
Notice that the XNOR gate will produce a HIGH when both inputs
are the same. This makes it useful for comparison functions.
The XNOR Gate
B
If the A waveform is inverted but B remains the same,
how is the output affected?
The output will be
inverted.
A
B
X A
B
X
= 1
UNIVERSAL GATE
NAND gate is universal gate
It can make another gate
NOT GATE
OR GATE
B
AND GATE
A point to remember
IC - INTEGRATED CIRCUIT
Quad 2-input AND Gate 7408
Logic gates circuits
Logic gates summary table
Logic gates
summary
Inverter
Truth table
Timing diagram
Boolean algebra
AND gate
A logic circuit that inverts or complements its inputs.
A table showing the inputs and corresponding output(s) of a logic
circuit.
A diagram of waveforms showing the proper time relationship of all
of the waveforms.
The mathematics of logic circuits.
A logic gate that produces a HIGH output only when all of its inputs
are HIGH.
OR gate
NAND gate
NOR gate
Exclusive-OR gate
Exclusive-NOR gate
A logic gate that produces a HIGH output when one or more
inputs are HIGH.
A logic gate that produces a LOW output only when all of its
inputs are HIGH.
A logic gate that produces a LOW output when one or more
inputs are HIGH.
A logic gate that produces a HIGH output only when its two
inputs are at opposite levels.
A logic gate that produces a LOW output only when its two
inputs are at opposite levels.
Logic gates
summary
Applications
Simple application of NAND gate
The application discussed here is that of a door closing
system of an automobile.
A car needs to be so designed that the driver gets a
visual indication if any of the doors of the car is open
so that it helps to avoid accident and injury to the
passengers.
Assuming there are two doors (just for simplicity, it
works for more doors as well) where this system is
fitted, the circuit can be designed using a NAND gate
as follows
You can see from the figure that when
any of the switches is open due to the
door position, the NAND gate energies
the lamp inside the car, hence warning
the driver.
A Car Door Open Warning System
using a NAND Gate
This truth table gives us the behaviour of
lamp inside the car when any one the
doors are opened
 (2) Fire Alarm system ( OR gate )
(3) Fire Control system AND gate
& OR gate
Some more examples
 Below is the logic gate for a simple
house alarm. The alarm protects the
front and back doors and six windows.
 Once the alarm is set if any of the
doors or windows are opened the
alarm will sound.
Find the output of the following circuit
Answer: (x+y)y
38
x
y
x+y
y
(x+y)y
__
Find the output of the following circuit
Answer: xy
x
y
x
y
x y x y
_ _
___
Give the Boolean expression of the given circuit
40
x
y
x+y
xy xy
(x+y)(xy)
Answer: (x+y)(xy)
Write the circuits for the following
Boolean algebraic expressions
a) x+y
41
x
y
__
x
x+y
Write the circuits for the following
Boolean algebraic expressions
b) (x+y)x
42
x
y
x
y
x
y
_______
x
y
x+y
x+y (x+y)x
Write a Boolean expression and draw the truth table to
represent this logic circuit diagram.
Exercise
A
B
C
A B C Output (Y)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Answer
Y= A.B.C
Table 8
Write a boolean expression and draw the truth table to
represent this logic circuit diagram.
Exercise
A B C Output
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Answer
Y= (A.B) + C
Table 9
Write a Boolean expression and draw the truth table to
represent this logic circuit diagram.
Exercise
A
C
B Y
A B C Output (Y)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
Answer
Y= (A+B)C
Table 9
Simple Logic
Circuit
Draw a logic circuit for (A+ B)C.
Simple Logic
Circuit
Draw a logic circuit for A + BC + 𝐷.
1. The truth table for a 2-input AND gate is
0 0
0 1
1 0
1 1
Inputs
A B X
Output
0 0
0 1
1 0
1 1
1
0
0
0
Inputs
A B X
Output
0 0
0 1
1 0
1 1
Inputs
A B X
Output
Inputs
A B X
Output
0 0
0 1
1 0
1 1
0
1
1
1
a. b.
c. d.
0
1
1
0
0
0
0
1
Exercise
2. The truth table for a 2-input NOR gate is
0 0
0 1
1 0
1 1
Inputs
A B X
Output
0 0
0 1
1 0
1 1
Inputs
A B X
Output
0 0
0 1
1 0
1 1
Inputs
A B X
Output
Inputs
A B X
Output
0 0
0 1
1 0
1 1
a. b.
c. d.
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
1
Exercise
3. The truth table for a 2-input XOR gate is
0 0
0 1
1 0
1 1
Inputs
A B X
Output
0 0
0 1
1 0
1 1
Inputs
A B X
Output
0 0
0 1
1 0
1 1
Inputs
A B X
Output
Inputs
A B X
Output
0 0
0 1
1 0
1 1
a. b.
c. d.
0
1
1
0
0
0
0
1
1
0
0
0
0
1
1
1
Exercise
4. The symbol is for a(n)
≥ 1
A
B
X
a. OR gate
b. AND gate
c. NOR gate
d. XOR gate
Exercise
5. The symbol is for a(n)
A
B
X
a. OR gate
b. AND gate
c. NOR gate
d. XOR gate
Exercise
6. A logic gate that produces a HIGH output only when all of its
inputs are HIGH is a(n)
a. OR gate
b. AND gate
c. NOR gate
d. NAND gate
Exercise
8. A 2-input gate produces the output shown. (X represents the output.)
This is a(n)
a. OR gate
b. AND gate
c. NOR gate
d. NAND gate
A
B
X
Exercise
9. A 2-input gate produces a HIGH output only when the inputs agree.
This type of gate is a(n)
a. OR gate
b. AND gate
c. NOR gate
d. XNOR gate
Exercise
Answers:
1. c
2. b
3. a
4. a
5. d
6. b
7. c
8. d
9. d
Exercise

More Related Content

What's hot

Design half ,full Adder and Subtractor
Design half ,full Adder and SubtractorDesign half ,full Adder and Subtractor
Design half ,full Adder and SubtractorJaimin@prt.ltd.
 
CSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesCSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesKevin Small
 
Computer logic and gates
Computer logic and gatesComputer logic and gates
Computer logic and gatessamina khan
 
Digital logic gates and Boolean algebra
Digital logic gates and Boolean algebraDigital logic gates and Boolean algebra
Digital logic gates and Boolean algebraSARITHA REDDY
 
Half adder and full adder
Half adder and full adderHalf adder and full adder
Half adder and full adderSanjuktaBanik
 
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and SubtractorSmit Shah
 
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...JatinJatin30
 
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuitsgourav kottawar
 
boolean algrebra and logic gates in short
boolean algrebra and logic gates in shortboolean algrebra and logic gates in short
boolean algrebra and logic gates in shortRojin Khadka
 
encoder and decoder in digital electronics
encoder and decoder in digital electronicsencoder and decoder in digital electronics
encoder and decoder in digital electronicsvikram rajpurohit
 

What's hot (20)

Logic Gates
Logic GatesLogic Gates
Logic Gates
 
Design half ,full Adder and Subtractor
Design half ,full Adder and SubtractorDesign half ,full Adder and Subtractor
Design half ,full Adder and Subtractor
 
CSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesCSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic Gates
 
Computer logic and gates
Computer logic and gatesComputer logic and gates
Computer logic and gates
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Digital logic gates and Boolean algebra
Digital logic gates and Boolean algebraDigital logic gates and Boolean algebra
Digital logic gates and Boolean algebra
 
Half adder and full adder
Half adder and full adderHalf adder and full adder
Half adder and full adder
 
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and Subtractor
 
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...12.Representation of signed binary numbers.  Binary codes - BCD code, Gray co...
12.Representation of signed binary numbers. Binary codes - BCD code, Gray co...
 
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuits
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
 
Signed Binary Numbers
Signed Binary NumbersSigned Binary Numbers
Signed Binary Numbers
 
Logic gates
Logic gatesLogic gates
Logic gates
 
boolean algrebra and logic gates in short
boolean algrebra and logic gates in shortboolean algrebra and logic gates in short
boolean algrebra and logic gates in short
 
Nand and nor
Nand and norNand and nor
Nand and nor
 
Presentation On Flip-Flop
Presentation On Flip-FlopPresentation On Flip-Flop
Presentation On Flip-Flop
 
Logic gates
Logic gatesLogic gates
Logic gates
 
digital Counter
digital Counterdigital Counter
digital Counter
 
VHDL- data types
VHDL- data typesVHDL- data types
VHDL- data types
 
encoder and decoder in digital electronics
encoder and decoder in digital electronicsencoder and decoder in digital electronics
encoder and decoder in digital electronics
 

Similar to Lecture 04-Digital logic gates.pptx (20)

Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
 
Digital logic
Digital logicDigital logic
Digital logic
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptx
 
logic gates
logic gateslogic gates
logic gates
 
Logic gates 07 11-2014
Logic gates 07 11-2014Logic gates 07 11-2014
Logic gates 07 11-2014
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Digital logic Gates of Computer Science
Digital logic Gates of Computer ScienceDigital logic Gates of Computer Science
Digital logic Gates of Computer Science
 
Logic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gatesLogic gates and NAND and NOR univarsal gates
Logic gates and NAND and NOR univarsal gates
 
Electronics: Logic Gates
Electronics: Logic GatesElectronics: Logic Gates
Electronics: Logic Gates
 
Deld lab manual
Deld lab manualDeld lab manual
Deld lab manual
 
Logic gates
Logic gatesLogic gates
Logic gates
 
ICT Basic Logic Gates Lessons.pptx
ICT Basic Logic Gates Lessons.pptxICT Basic Logic Gates Lessons.pptx
ICT Basic Logic Gates Lessons.pptx
 
Logic gates
Logic gatesLogic gates
Logic gates
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdfM. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
 
Class 12th Logic Gates
Class 12th Logic GatesClass 12th Logic Gates
Class 12th Logic Gates
 
Logic gates i & ii
Logic gates i & iiLogic gates i & ii
Logic gates i & ii
 
combinational _logic_circuit_digital.pptx
combinational _logic_circuit_digital.pptxcombinational _logic_circuit_digital.pptx
combinational _logic_circuit_digital.pptx
 
Chap 3
Chap 3Chap 3
Chap 3
 
logic gates
logic gates logic gates
logic gates
 

More from WilliamJosephat1

3 Communication & Active Listening.pptx
3 Communication & Active Listening.pptx3 Communication & Active Listening.pptx
3 Communication & Active Listening.pptxWilliamJosephat1
 
1. ELEMENTS & PROCESS OF COMM..pptx
1. ELEMENTS & PROCESS OF COMM..pptx1. ELEMENTS & PROCESS OF COMM..pptx
1. ELEMENTS & PROCESS OF COMM..pptxWilliamJosephat1
 
10.CURRICULUM VITAE (CV).pptx
10.CURRICULUM VITAE (CV).pptx10.CURRICULUM VITAE (CV).pptx
10.CURRICULUM VITAE (CV).pptxWilliamJosephat1
 
5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptx
5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptx5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptx
5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptxWilliamJosephat1
 
2. BARRIERS TO COMMUNICATION.pptx
2. BARRIERS TO COMMUNICATION.pptx2. BARRIERS TO COMMUNICATION.pptx
2. BARRIERS TO COMMUNICATION.pptxWilliamJosephat1
 
Lecture 05-Logic expression and Boolean Algebra.pptx
Lecture 05-Logic expression and Boolean Algebra.pptxLecture 05-Logic expression and Boolean Algebra.pptx
Lecture 05-Logic expression and Boolean Algebra.pptxWilliamJosephat1
 

More from WilliamJosephat1 (7)

3 Communication & Active Listening.pptx
3 Communication & Active Listening.pptx3 Communication & Active Listening.pptx
3 Communication & Active Listening.pptx
 
1. ELEMENTS & PROCESS OF COMM..pptx
1. ELEMENTS & PROCESS OF COMM..pptx1. ELEMENTS & PROCESS OF COMM..pptx
1. ELEMENTS & PROCESS OF COMM..pptx
 
6. LISTENING SKILLS.pptx
6. LISTENING SKILLS.pptx6. LISTENING SKILLS.pptx
6. LISTENING SKILLS.pptx
 
10.CURRICULUM VITAE (CV).pptx
10.CURRICULUM VITAE (CV).pptx10.CURRICULUM VITAE (CV).pptx
10.CURRICULUM VITAE (CV).pptx
 
5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptx
5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptx5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptx
5. COMMUNICATION NETWORKS WITHIN ORGANIZATIONS.pptx
 
2. BARRIERS TO COMMUNICATION.pptx
2. BARRIERS TO COMMUNICATION.pptx2. BARRIERS TO COMMUNICATION.pptx
2. BARRIERS TO COMMUNICATION.pptx
 
Lecture 05-Logic expression and Boolean Algebra.pptx
Lecture 05-Logic expression and Boolean Algebra.pptxLecture 05-Logic expression and Boolean Algebra.pptx
Lecture 05-Logic expression and Boolean Algebra.pptx
 

Recently uploaded

How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxJenilouCasareno
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resourcesaileywriter
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfPo-Chuan Chen
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFVivekanand Anglo Vedic Academy
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfTamralipta Mahavidyalaya
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringDenish Jangid
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...Nguyen Thanh Tu Collection
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
 

Recently uploaded (20)

How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDF
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 

Lecture 04-Digital logic gates.pptx

  • 2. Logic gates Computer and other digital devices are sometimes looked upon by the general public as magical. Actually digital electronic devices are extremely logical in their operations. The basic building block of any digital circuit is a logic gate. A logic gate is an electronic circuit which makes logical decision. It has one or more inputs and only one output. The output signal appears only for certain combinations of the input signals.
  • 3. Logic gate In computer, logic gates are the building blocks. Most of the functions in a computer, with the exception of certain types of memory, are implemented with logic gates used on a very large scale. For example a microprocessor, which is made up of hundreds of thousands or even millions of logic gates.
  • 4. Logic gates Logic gates can be constructed by using simple switches, relays, vacuum tubes, transistors and diodes or ICs Because of their availability , wide use and low cost. ICs will be used to construct digital circuits. A variety of logic gates are available in all logic families including Transistor– transistor logic (TTL) and CMOS.
  • 5. Positive and Negative logic gate In computing systems, the binary digits “0 and 1” represent two possible states of a circuit or device. It makes difference if these two states are referred to “Off and On” or “Closed and Open” or “Low and High” or “Minus and Plus” or “False and True” depending on the circumstances.
  • 6. Positive and Negative logic gate o Positive and Negative Logic  In positive logic, 1 represents: 1. An ON circuit 2. A CLOSED switch 3. A HIGH voltage 4. A PLUS sign 5. A TRUE statement o Positive and Negative Logic  Consequently, 0 represents: 1. An OFF circuit 2. A OPEN switch 3. A LOW voltage 4. A MINUS sign 5. A FALSE statement
  • 7. Example o Suppose, a digital system has two voltage levels of “0V and 5V”. 1. If we say that digit 1 stands for 5V and digit 0 stands for 0V, then we have positive logic system. 2. If, on other hand, we decide that 1 should stand for 0V and 0 stands for 5V, then we will have a negative logic system. o Note: It is not necessary that a 0 has to be represented by 0V, it can be any voltage level. o The main concept is that, in positive logic, the more positive of the two quantities represents the 1 and in negative logic, the more negative voltage represents 0.
  • 8. Types of logic Gates o There are seven types logic gates whose function is to perform logical operations. These are (note the use of capital letters to name the gates): 1. AND gate 2. OR gate 3. NOT gate 4. NAND gate 5. NOR gate 6. XOR gate 7. XNOR gate
  • 9. The inverter performs the Boolean NOT operation. When the input is LOW, the output is HIGH; when the input is HIGH, the output is LOW. The Inverter A X Input A X Output LOW (0) HIGH (1) HIGH (1) LOW(0) The NOT operation (complement) is shown with an overbar. Thus, the Boolean expression for an inverter is X = A.
  • 10. The Inverter Example waveforms: A X A X A group of inverters can be used to form the 1’s complement of a binary number: Binary number 1’s complement 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 0
  • 11. The AND gate produces a HIGH output when all inputs are HIGH; otherwise, the output is LOW. For a 2-input gate, the truth table is The AND Gate The AND operation is usually shown with a dot between the variables but it may be implied (no dot). Thus, the AND operation is written as X = A .B or X = AB. Inputs A B X Output 0 0 0 1 1 0 1 1 0 0 0 1 A B X & A B X
  • 12. Example waveforms: A X The AND operation is used in computer programming as a selective mask. If you want to retain certain bits of a binary number but reset the other bits to 0, you could set a mask with 1’s in the position of the retained bits. The AND Gate A B X B 00000011 If the binary number 10100011 is ANDed with the mask 00001111, what is the result? & A B X
  • 13. The OR gate produces a HIGH output if any input is HIGH; if all inputs are LOW, the output is LOW. For a 2-input gate, the truth table is The OR Gate The OR operation is shown with a plus sign (+) between the variables. Thus, the OR operation is written as X = A + B. Inputs A B X Output 0 0 0 1 1 0 1 1 0 1 1 1 A B X A B X ≥ 1
  • 14. Example waveforms: A X The OR operation can be used in computer programming to set certain bits of a binary number to 1. The OR Gate B A B X A B X ≥ 1 ASCII letters have a 1 in the bit 5 position for lower case letters and a 0 in this position for capitals. (Bit positions are numbered from right to left starting with 0.) What will be the result if you OR an ASCII letter with the 8-bit mask 00100000? The resulting letter will be lower case.
  • 15. The NAND gate produces a LOW output when all inputs are HIGH; otherwise, the output is HIGH. For a 2-input gate, the truth table is The NAND Gate Inputs A B X Output 0 0 0 1 1 0 1 1 1 1 1 0 A B X A B X & The NAND operation is shown with a dot between the variables and an overbar covering them. Thus, the NAND operation is written as X = A .B (Alternatively, X = AB.)
  • 16. Example waveforms: A X The NAND gate is particularly useful because it is a “universal” gate – all other basic gates can be constructed from NAND gates. The NAND Gate B How would you connect a 2-input NAND gate to form a basic inverter? A B X A B X &
  • 17. The NOR gate produces a LOW output if any input is HIGH; if all inputs are HIGH, the output is LOW. For a 2-input gate, the truth table is The NOR Gate Inputs A B X Output 0 0 0 1 1 0 1 1 1 0 0 0 A B X A B X ≥1 The NOR operation is shown with a plus sign (+) between the variables and an overbar covering them. Thus, the NOR operation is written as X = A + B.
  • 18. Example waveforms: A X The NOR operation will produce a LOW if any input is HIGH. The NOR Gate B When is the LED is ON for the circuit shown? The LED will be on when any of the four inputs are HIGH. A C B D X 330W +5.0 V A B X A B X ≥1
  • 19. The XOR gate produces a HIGH output only when both inputs are at opposite logic levels. The truth table is The XOR Gate Inputs A B X Output 0 0 0 1 1 0 1 1 0 1 1 0 A B X A B X = 1 The XOR operation is written as X = AB + AB. Alternatively, it can be written with a circled plus sign between the variables as X = A + B.
  • 21. Example waveforms: A X Notice that the XOR gate will produce a HIGH only when exactly one input is HIGH. The XOR Gate B If the A and B waveforms are both inverted for the above waveforms, how is the output affected? There is no change in the output. A B X A B X = 1
  • 22. The XNOR gate produces a HIGH output only when both inputs are at the same logic level. The truth table is The XNOR Gate Inputs A B X Output 0 0 0 1 1 0 1 1 1 0 0 1 A B X A B X The XNOR operation shown as X = AB + AB. Alternatively, the XNOR operation can be shown with a circled dot between the variables. Thus, it can be shown as X = A . B. = 1
  • 23. Example waveforms: A X Notice that the XNOR gate will produce a HIGH when both inputs are the same. This makes it useful for comparison functions. The XNOR Gate B If the A waveform is inverted but B remains the same, how is the output affected? The output will be inverted. A B X A B X = 1
  • 24. UNIVERSAL GATE NAND gate is universal gate It can make another gate NOT GATE OR GATE B AND GATE
  • 25. A point to remember
  • 26. IC - INTEGRATED CIRCUIT Quad 2-input AND Gate 7408
  • 29. Logic gates summary Inverter Truth table Timing diagram Boolean algebra AND gate A logic circuit that inverts or complements its inputs. A table showing the inputs and corresponding output(s) of a logic circuit. A diagram of waveforms showing the proper time relationship of all of the waveforms. The mathematics of logic circuits. A logic gate that produces a HIGH output only when all of its inputs are HIGH.
  • 30. OR gate NAND gate NOR gate Exclusive-OR gate Exclusive-NOR gate A logic gate that produces a HIGH output when one or more inputs are HIGH. A logic gate that produces a LOW output only when all of its inputs are HIGH. A logic gate that produces a LOW output when one or more inputs are HIGH. A logic gate that produces a HIGH output only when its two inputs are at opposite levels. A logic gate that produces a LOW output only when its two inputs are at opposite levels. Logic gates summary
  • 31. Applications Simple application of NAND gate The application discussed here is that of a door closing system of an automobile. A car needs to be so designed that the driver gets a visual indication if any of the doors of the car is open so that it helps to avoid accident and injury to the passengers. Assuming there are two doors (just for simplicity, it works for more doors as well) where this system is fitted, the circuit can be designed using a NAND gate as follows
  • 32. You can see from the figure that when any of the switches is open due to the door position, the NAND gate energies the lamp inside the car, hence warning the driver. A Car Door Open Warning System using a NAND Gate
  • 33. This truth table gives us the behaviour of lamp inside the car when any one the doors are opened
  • 34.  (2) Fire Alarm system ( OR gate )
  • 35. (3) Fire Control system AND gate & OR gate
  • 36. Some more examples  Below is the logic gate for a simple house alarm. The alarm protects the front and back doors and six windows.  Once the alarm is set if any of the doors or windows are opened the alarm will sound.
  • 37.
  • 38. Find the output of the following circuit Answer: (x+y)y 38 x y x+y y (x+y)y __
  • 39. Find the output of the following circuit Answer: xy x y x y x y x y _ _ ___
  • 40. Give the Boolean expression of the given circuit 40 x y x+y xy xy (x+y)(xy) Answer: (x+y)(xy)
  • 41. Write the circuits for the following Boolean algebraic expressions a) x+y 41 x y __ x x+y
  • 42. Write the circuits for the following Boolean algebraic expressions b) (x+y)x 42 x y x y x y _______ x y x+y x+y (x+y)x
  • 43. Write a Boolean expression and draw the truth table to represent this logic circuit diagram. Exercise A B C
  • 44. A B C Output (Y) 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 Answer Y= A.B.C Table 8
  • 45. Write a boolean expression and draw the truth table to represent this logic circuit diagram. Exercise
  • 46. A B C Output 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Answer Y= (A.B) + C Table 9
  • 47. Write a Boolean expression and draw the truth table to represent this logic circuit diagram. Exercise A C B Y
  • 48. A B C Output (Y) 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 Answer Y= (A+B)C Table 9
  • 49. Simple Logic Circuit Draw a logic circuit for (A+ B)C.
  • 50. Simple Logic Circuit Draw a logic circuit for A + BC + 𝐷.
  • 51. 1. The truth table for a 2-input AND gate is 0 0 0 1 1 0 1 1 Inputs A B X Output 0 0 0 1 1 0 1 1 1 0 0 0 Inputs A B X Output 0 0 0 1 1 0 1 1 Inputs A B X Output Inputs A B X Output 0 0 0 1 1 0 1 1 0 1 1 1 a. b. c. d. 0 1 1 0 0 0 0 1 Exercise
  • 52. 2. The truth table for a 2-input NOR gate is 0 0 0 1 1 0 1 1 Inputs A B X Output 0 0 0 1 1 0 1 1 Inputs A B X Output 0 0 0 1 1 0 1 1 Inputs A B X Output Inputs A B X Output 0 0 0 1 1 0 1 1 a. b. c. d. 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 Exercise
  • 53. 3. The truth table for a 2-input XOR gate is 0 0 0 1 1 0 1 1 Inputs A B X Output 0 0 0 1 1 0 1 1 Inputs A B X Output 0 0 0 1 1 0 1 1 Inputs A B X Output Inputs A B X Output 0 0 0 1 1 0 1 1 a. b. c. d. 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 1 Exercise
  • 54. 4. The symbol is for a(n) ≥ 1 A B X a. OR gate b. AND gate c. NOR gate d. XOR gate Exercise
  • 55. 5. The symbol is for a(n) A B X a. OR gate b. AND gate c. NOR gate d. XOR gate Exercise
  • 56. 6. A logic gate that produces a HIGH output only when all of its inputs are HIGH is a(n) a. OR gate b. AND gate c. NOR gate d. NAND gate Exercise
  • 57. 8. A 2-input gate produces the output shown. (X represents the output.) This is a(n) a. OR gate b. AND gate c. NOR gate d. NAND gate A B X Exercise
  • 58. 9. A 2-input gate produces a HIGH output only when the inputs agree. This type of gate is a(n) a. OR gate b. AND gate c. NOR gate d. XNOR gate Exercise
  • 59. Answers: 1. c 2. b 3. a 4. a 5. d 6. b 7. c 8. d 9. d Exercise