SlideShare a Scribd company logo
Logic Gates
Introduction
Logic gates process signals which represent true or false. Normally the positive supply voltage +Vs represents true
and 0V represents false. Other terms which are used for the true and false states are shown in the table on the right.
It is best to be familiar with them all.
Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR. Capital letters are normally
used to make it clear that the term refers to a logic gate.
Note that logic gates are not always required because simple logic functions can be performed with switches or
diodes:
Switches in series (AND function)
Switches in parallel (OR function)
Combining IC outputs with diodes (OR function)
Logic gate symbols
There are two series of symbols for logic gates:
The traditional symbols have distinctive shapes making them easy to recognise so they are widely used in industry and
education.
The IEC (International Electrotechnical Commission) symbols are rectangles with a symbol inside to show the gate
function. They are rarely used despite their official status, but you may need to know them for an examination.
Inputs and outputs
Gates have two or more inputs, except a NOT gate which has only one input. All gates have only one
output. Usually the letters A, B, C and so on are used to label inputs, and Q is used to label the output.
On this page the inputs are shown on the left and the output on the right.
The inverting circle (o)
Some gate symbols have a circle on their output which means that their function includes inverting of the
output. It is equivalent to feeding the output through a NOT gate. For example the NAND (Not AND) gate
symbol shown on the right is the same as an AND gate symbol but with the addition of an inverting circle on the
output.
Truth tables
A truth table is a good way to show the function of a logic gate. It shows the output states for every
possible combination of input states. The symbols 0 (false) and 1 (true) are usually used in truth tables.
The example truth table on the right shows the inputs and output of an AND gate.
There are summary truth tables below showing the output states for all types of 2-input and 3-input gates.
These can be helpful if you are trying to select a suitable gate.
Logic ICs
Logic gates are available on special ICs (chips) which usually contain several gates of the same
type, for example the 4001 IC contains four 2-input NOR gates. There are several families of logic
ICs and they can be split into two groups:
4000 Series
74 Series
To quickly compare the different families please see:
Summary table of logic families
The 4000 and 74HC families are the best for battery powered projects because they will work with a good range of supply voltages
and they use very little power. However, if you are using them to design circuits and investigate logic gates please remember that all
Logic states
True False
1 0
High Low
+Vs 0V
On Off
Input A Input B Output Q
0 0 0
0 1 0
1 0 0
1 1 1
unused inputs MUST be connected to the power supply (either +Vs or 0V), this applies even if that part of the IC is not being used in
the circuit!
NOT gate (inverter)
The output Q is true when the input A is NOT true, the output is the inverse of the input: Q = NOT A
A NOT gate can only have one input. A NOT gate is also called an inverter.
AND gate
The output Q is true if input A AND input B are both true: Q = A AND B
An AND gate can have two or more inputs, its output is true if all inputs are true.
NAND gate (NAND = Not AND)
This is an AND gate with the output inverted, as shown by the 'o' on the output.
The output is true if input A AND input B are NOT both true: Q = NOT (A AND B)
A NAND gate can have two or more inputs, its output is true if NOT all inputs are true.
OR gate
The output Q is true if input A OR input B is true (or both of them are true): Q = A OR B
An OR gate can have two or more inputs, its output is true if at least one input is true.
NOR gate (NOR = Not OR)
This is an OR gate with the output inverted, as shown by the 'o' on the output.
The output Q is true if NOT inputs A OR B are true: Q = NOT (A OR B)
A NOR gate can have two or more inputs, its output is true if no inputs are true.
EX-OR (EXclusive-OR) gate
The output Q is true if either input A is true OR input B is true, but not when both of them are true:
Q = (A AND NOT B) OR (B AND NOT A)
This is like an OR gate but excluding both inputs being true.
The output is true if inputs A and B are DIFFERENT.
EX-OR gates can only have 2 inputs.
EX-NOR (EXclusive-NOR) gate
This is an EX-OR gate with the output inverted, as shown by the 'o' on the output.
The output Q is true if inputs A and B are the SAME (both true or both false): Q = (A AND B) OR (NOT A AND NOT B)
EX-NOR gates can only have 2 inputs.
Summary truth tables
The summary truth tables below show the output states for all types of 2-input and 3-input gates.
Summary for all 2-input gates
Inputs Output of each gate
A B AND NAND OR NOR EX-OR EX-NOR
0 0 0 1 0 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 0 1 0 0 1
Summary for all 3-input gates
Inputs Output of each gate
A B C AND NAND OR NOR
0 0 0 0 1 0 1
0 0 1 0 1 1 0
0 1 0 0 1 1 0
0 1 1 0 1 1 0
1 0 0 0 1 1 0
1 0 1 0 1 1 0
1 1 0 0 1 1 0
1 1 1 1 0 1 0
Note that EX-OR and EX-NOR
gates can only have 2 inputs.
Combinations of logic gates
Logic gates can be combined to produce more complex functions. They can also be combined to substitute one type of gate for
another.
For example to produce an output Q which is true only when input A is true and input B is false, as shown
in the truth table on the right, we can combine a NOT gate and an AND gate like this:
Q = A AND NOT B
Working out the function of a combination of gates
Truth tables can be used to work out the function of a combination of gates.
For example the truth table on the right show the intermediate outputs D and E as well as the final output Q for
the system shown below. D = NOT (A OR B)
E = B AND C
Q = D OR E = (NOT (A OR B)) OR (B
AND C)
Input A Input B Output Q
0 0 0
0 1 0
1 0 1
1 1 0
Inputs Outputs
A B C D E Q
0 0 0 1 0 1
0 0 1 1 0 1
0 1 0 0 0 0
0 1 1 0 1 1
1 0 0 0 0 0
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 1 1
Substituting one type of gate for another
Logic gates are available on ICs which usually contain several gates of the same type, for example four 2-input NAND gates or
three 3-input NAND gates. This can be wasteful if only a few gates are required unless they are all the same type.
To avoid using too many ICs you can reduce the number of gate inputs or substitute one type of gate for another.
Reducing the number of inputs
The number of inputs to a gate can be reduced by connecting two (or more) inputs together. The diagram shows
a 3-input AND gate operating as a 2-input AND gate.
Making a NOT gate from a NAND or NOR gate
Reducing a NAND or NOR gate to just one input creates a NOT gate. The diagram shows this for a 2-input NAND gate.
Any gate can be built from NAND or NOR gates
As well as making a NOT gate, NAND or NOR gates can be combined to create any type of gate! This enables a circuit to be built
from just one type of gate, either NAND or NOR. For example an AND gate is a NAND gate then a NOT gate (to undo the inverting
function). Note that AND and OR gates cannot be used to create other gates because they lack the inverting (NOT) function.
To change the type of gate, such as changing OR to AND, you must do three things:
Invert (NOT) each input.
Change the gate type (OR to AND, or AND to OR)
Invert (NOT) the output.
For example an OR gate can be built from NOTed inputs fed into a NAND (AND + NOT) gate.
NAND gate equivalents
The table below shows the NAND gate equivalents of NOT, AND, OR and NOR gates:
Gate Equivalent in NAND gates
NOT
AND
OR
NOR
Substituting gates in an example logic system
The original system has 3 different gates: NOR, AND and OR. This requires three ICs (one for each type of gate).
To re-design this system using NAND gates only begin by replacing each gate with its NAND gate equivalent, as shown in the
diagram below.
Then simplify the system by deleting adjacent pairs of NOT gates (marked X
above). This can be done because the second NOT gate cancels the action of
the first.
The final system is shown on the right. It has five NAND gates and requires
two ICs (with four gates on each IC). This is better than the original system
which required three ICs (one for each type of gate).
Substituting NAND (or NOR) gates does not always increase the number of
gates, but when it does (as in this example) the increase is usually only one or
two gates. The real benefit is reducing the number of ICs required by using just
one type of gate.

More Related Content

What's hot

Logic gates
Logic gatesLogic gates
Logic gates
Asuquo Asuquo
 
Logic gates
Logic gatesLogic gates
Logic gates
Rahul Thukral
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Satya P. Joshi
 
Logic gates
Logic gatesLogic gates
Logic Gates
Logic GatesLogic Gates
Logic Gates
Adeel Rasheed
 
Logic gates i & ii
Logic gates i & iiLogic gates i & ii
Logic gates i & ii
Samuel Igbanogu
 
Digital Basics
Digital BasicsDigital Basics
Digital Basics
nitinpatelceng
 
Logic gate
Logic gateLogic gate
Logic gate
Nazim Naeem
 
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
Dhwanil Champaneria
 
Digital logic, an inverter or NOT gate
Digital logic, an inverter or NOT gateDigital logic, an inverter or NOT gate
Digital logic, an inverter or NOT gate
Roorkee College of Engineering, Roorkee
 
Logic gates 07 11-2014
Logic gates 07 11-2014Logic gates 07 11-2014
Logic gates 07 11-2014
Govind Kaintura
 
Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Howard Wong
 
Basic Logic gates
Basic Logic gatesBasic Logic gates
Basic Logic gates
Nong Aquino jr.
 
Logic gate implementing without using ICs by Nimay Giri
Logic gate implementing without using ICs by Nimay GiriLogic gate implementing without using ICs by Nimay Giri
Logic gate implementing without using ICs by Nimay Giri
nimay1
 
logic gates
logic gateslogic gates

What's hot (20)

Logic gates
Logic gatesLogic gates
Logic gates
 
LOGIC GATES
LOGIC GATESLOGIC GATES
LOGIC GATES
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
 
Chap 3
Chap 3Chap 3
Chap 3
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
 
Logical Gates
Logical GatesLogical Gates
Logical Gates
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
 
Logic gates i & ii
Logic gates i & iiLogic gates i & ii
Logic gates i & ii
 
Digital Basics
Digital BasicsDigital Basics
Digital Basics
 
Logic gate
Logic gateLogic gate
Logic gate
 
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
 
Digital logic, an inverter or NOT gate
Digital logic, an inverter or NOT gateDigital logic, an inverter or NOT gate
Digital logic, an inverter or NOT gate
 
Logic gates 07 11-2014
Logic gates 07 11-2014Logic gates 07 11-2014
Logic gates 07 11-2014
 
Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3Digital Logic Gates and RAID Explained v1.3
Digital Logic Gates and RAID Explained v1.3
 
Basic Logic gates
Basic Logic gatesBasic Logic gates
Basic Logic gates
 
Logic gates (1)
Logic gates (1)Logic gates (1)
Logic gates (1)
 
Logic gate implementing without using ICs by Nimay Giri
Logic gate implementing without using ICs by Nimay GiriLogic gate implementing without using ICs by Nimay Giri
Logic gate implementing without using ICs by Nimay Giri
 
logic gates
logic gateslogic gates
logic gates
 

Viewers also liked

Ari 550 590
Ari 550 590Ari 550 590
Ari 550 590dhvll
 
The art of observation coffee shops
The art of observation   coffee shopsThe art of observation   coffee shops
The art of observation coffee shops
fish40
 
caracteristicas y diferencias de la familia tradicional y moderna
caracteristicas y diferencias de la familia tradicional y modernacaracteristicas y diferencias de la familia tradicional y moderna
caracteristicas y diferencias de la familia tradicional y moderna
MAriss Aguilar Yucra
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
In a Rocket
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media Plan
Post Planner
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
Kirsty Hulse
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
ux singapore
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Stanford GSB Corporate Governance Research Initiative
 

Viewers also liked (8)

Ari 550 590
Ari 550 590Ari 550 590
Ari 550 590
 
The art of observation coffee shops
The art of observation   coffee shopsThe art of observation   coffee shops
The art of observation coffee shops
 
caracteristicas y diferencias de la familia tradicional y moderna
caracteristicas y diferencias de la familia tradicional y modernacaracteristicas y diferencias de la familia tradicional y moderna
caracteristicas y diferencias de la familia tradicional y moderna
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media Plan
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Similar to Logic gates

Digital logic
Digital logicDigital logic
Digital logic
Madhu Bala
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
WilliamJosephat1
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic logic gates
Param Radadiya
 
Digital logic Gates of Computer Science
Digital logic Gates of Computer ScienceDigital logic Gates of Computer Science
Digital logic Gates of Computer Science
Anil Kumar Prajapati
 
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
Dr.Florence Dayana
 
Basic logic gates and buffers
Basic logic gates and buffersBasic logic gates and buffers
Basic logic gates and buffersEdmund Merren
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptx
AravindaAKumar1
 
digital electronics .pptx
digital electronics .pptxdigital electronics .pptx
digital electronics .pptx
Ajaykumar967485
 
Logic gates
Logic gatesLogic gates
Deld lab manual
Deld lab manualDeld lab manual
Deld lab manual
Vivek Kumar Sinha
 
INTRODUCTION OF LOGIC GATES
INTRODUCTION OF LOGIC GATESINTRODUCTION OF LOGIC GATES
INTRODUCTION OF LOGIC GATES
SOUVIKCHATTERJEE80
 
Computer and network technology (CNT) lecture 03
Computer and network technology (CNT)   lecture 03Computer and network technology (CNT)   lecture 03
Computer and network technology (CNT) lecture 03
Susantha Herath
 
STE 10 Logic gates.pptx
STE 10 Logic gates.pptxSTE 10 Logic gates.pptx
STE 10 Logic gates.pptx
ssuserafb447
 
Basic Logic Gates with Truth Tables.pdf
Basic Logic Gates with Truth Tables.pdfBasic Logic Gates with Truth Tables.pdf
Basic Logic Gates with Truth Tables.pdf
KINGZzofYouTube
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
Techglyphs
 
Logic gates and Boolean Algebra_VSG
Logic gates and Boolean Algebra_VSGLogic gates and Boolean Algebra_VSG
Logic gates and Boolean Algebra_VSG
VaibhavGalbale1
 
Module 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptxModule 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptx
DrVaibhavMeshram
 

Similar to Logic gates (20)

Edc
EdcEdc
Edc
 
Digital logic
Digital logicDigital logic
Digital logic
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
 
Lesson 2
Lesson 2Lesson 2
Lesson 2
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic 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
 
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
 
Basic logic gates and buffers
Basic logic gates and buffersBasic logic gates and buffers
Basic logic gates and buffers
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptx
 
digital electronics .pptx
digital electronics .pptxdigital electronics .pptx
digital electronics .pptx
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Deld lab manual
Deld lab manualDeld lab manual
Deld lab manual
 
OR, AND, NOT Gates
OR, AND, NOT GatesOR, AND, NOT Gates
OR, AND, NOT Gates
 
INTRODUCTION OF LOGIC GATES
INTRODUCTION OF LOGIC GATESINTRODUCTION OF LOGIC GATES
INTRODUCTION OF LOGIC GATES
 
Computer and network technology (CNT) lecture 03
Computer and network technology (CNT)   lecture 03Computer and network technology (CNT)   lecture 03
Computer and network technology (CNT) lecture 03
 
STE 10 Logic gates.pptx
STE 10 Logic gates.pptxSTE 10 Logic gates.pptx
STE 10 Logic gates.pptx
 
Basic Logic Gates with Truth Tables.pdf
Basic Logic Gates with Truth Tables.pdfBasic Logic Gates with Truth Tables.pdf
Basic Logic Gates with Truth Tables.pdf
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
 
Logic gates and Boolean Algebra_VSG
Logic gates and Boolean Algebra_VSGLogic gates and Boolean Algebra_VSG
Logic gates and Boolean Algebra_VSG
 
Module 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptxModule 4 Logic Circuits.pptx
Module 4 Logic Circuits.pptx
 

Recently uploaded

Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024
FelixPerez547899
 
LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024
Lital Barkan
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
fisherameliaisabella
 
3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx
tanyjahb
 
Creative Web Design Company in Singapore
Creative Web Design Company in SingaporeCreative Web Design Company in Singapore
Creative Web Design Company in Singapore
techboxsqauremedia
 
VAT Registration Outlined In UAE: Benefits and Requirements
VAT Registration Outlined In UAE: Benefits and RequirementsVAT Registration Outlined In UAE: Benefits and Requirements
VAT Registration Outlined In UAE: Benefits and Requirements
uae taxgpt
 
falcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-indiafalcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-india
Falcon Invoice Discounting
 
Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111
zoyaansari11365
 
5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer
ofm712785
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
Cynthia Clay
 
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdfikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
agatadrynko
 
20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf
tjcomstrang
 
FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134
LR1709MUSIC
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
Operational Excellence Consulting
 
Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...
dylandmeas
 
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
BBPMedia1
 
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBdCree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
creerey
 
The key differences between the MDR and IVDR in the EU
The key differences between the MDR and IVDR in the EUThe key differences between the MDR and IVDR in the EU
The key differences between the MDR and IVDR in the EU
Allensmith572606
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
daothibichhang1
 
Set off and carry forward of losses and assessment of individuals.pptx
Set off and carry forward of losses and assessment of individuals.pptxSet off and carry forward of losses and assessment of individuals.pptx
Set off and carry forward of losses and assessment of individuals.pptx
HARSHITHV26
 

Recently uploaded (20)

Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024Company Valuation webinar series - Tuesday, 4 June 2024
Company Valuation webinar series - Tuesday, 4 June 2024
 
LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024LA HUG - Video Testimonials with Chynna Morgan - June 2024
LA HUG - Video Testimonials with Chynna Morgan - June 2024
 
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdfModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
ModelingMarketingStrategiesMKS.CollumbiaUniversitypdf
 
3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx3.0 Project 2_ Developing My Brand Identity Kit.pptx
3.0 Project 2_ Developing My Brand Identity Kit.pptx
 
Creative Web Design Company in Singapore
Creative Web Design Company in SingaporeCreative Web Design Company in Singapore
Creative Web Design Company in Singapore
 
VAT Registration Outlined In UAE: Benefits and Requirements
VAT Registration Outlined In UAE: Benefits and RequirementsVAT Registration Outlined In UAE: Benefits and Requirements
VAT Registration Outlined In UAE: Benefits and Requirements
 
falcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-indiafalcon-invoice-discounting-a-premier-platform-for-investors-in-india
falcon-invoice-discounting-a-premier-platform-for-investors-in-india
 
Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111Introduction to Amazon company 111111111111
Introduction to Amazon company 111111111111
 
5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer5 Things You Need To Know Before Hiring a Videographer
5 Things You Need To Know Before Hiring a Videographer
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdfikea_woodgreen_petscharity_cat-alogue_digital.pdf
ikea_woodgreen_petscharity_cat-alogue_digital.pdf
 
20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf20240425_ TJ Communications Credentials_compressed.pdf
20240425_ TJ Communications Credentials_compressed.pdf
 
FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134FINAL PRESENTATION.pptx12143241324134134
FINAL PRESENTATION.pptx12143241324134134
 
Sustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & EconomySustainability: Balancing the Environment, Equity & Economy
Sustainability: Balancing the Environment, Equity & Economy
 
Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...Discover the innovative and creative projects that highlight my journey throu...
Discover the innovative and creative projects that highlight my journey throu...
 
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
RMD24 | Retail media: hoe zet je dit in als je geen AH of Unilever bent? Heid...
 
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBdCree_Rey_BrandIdentityKit.PDF_PersonalBd
Cree_Rey_BrandIdentityKit.PDF_PersonalBd
 
The key differences between the MDR and IVDR in the EU
The key differences between the MDR and IVDR in the EUThe key differences between the MDR and IVDR in the EU
The key differences between the MDR and IVDR in the EU
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
 
Set off and carry forward of losses and assessment of individuals.pptx
Set off and carry forward of losses and assessment of individuals.pptxSet off and carry forward of losses and assessment of individuals.pptx
Set off and carry forward of losses and assessment of individuals.pptx
 

Logic gates

  • 1. Logic Gates Introduction Logic gates process signals which represent true or false. Normally the positive supply voltage +Vs represents true and 0V represents false. Other terms which are used for the true and false states are shown in the table on the right. It is best to be familiar with them all. Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR. Capital letters are normally used to make it clear that the term refers to a logic gate. Note that logic gates are not always required because simple logic functions can be performed with switches or diodes: Switches in series (AND function) Switches in parallel (OR function) Combining IC outputs with diodes (OR function) Logic gate symbols There are two series of symbols for logic gates: The traditional symbols have distinctive shapes making them easy to recognise so they are widely used in industry and education. The IEC (International Electrotechnical Commission) symbols are rectangles with a symbol inside to show the gate function. They are rarely used despite their official status, but you may need to know them for an examination. Inputs and outputs Gates have two or more inputs, except a NOT gate which has only one input. All gates have only one output. Usually the letters A, B, C and so on are used to label inputs, and Q is used to label the output. On this page the inputs are shown on the left and the output on the right. The inverting circle (o) Some gate symbols have a circle on their output which means that their function includes inverting of the output. It is equivalent to feeding the output through a NOT gate. For example the NAND (Not AND) gate symbol shown on the right is the same as an AND gate symbol but with the addition of an inverting circle on the output. Truth tables A truth table is a good way to show the function of a logic gate. It shows the output states for every possible combination of input states. The symbols 0 (false) and 1 (true) are usually used in truth tables. The example truth table on the right shows the inputs and output of an AND gate. There are summary truth tables below showing the output states for all types of 2-input and 3-input gates. These can be helpful if you are trying to select a suitable gate. Logic ICs Logic gates are available on special ICs (chips) which usually contain several gates of the same type, for example the 4001 IC contains four 2-input NOR gates. There are several families of logic ICs and they can be split into two groups: 4000 Series 74 Series To quickly compare the different families please see: Summary table of logic families The 4000 and 74HC families are the best for battery powered projects because they will work with a good range of supply voltages and they use very little power. However, if you are using them to design circuits and investigate logic gates please remember that all Logic states True False 1 0 High Low +Vs 0V On Off Input A Input B Output Q 0 0 0 0 1 0 1 0 0 1 1 1
  • 2. unused inputs MUST be connected to the power supply (either +Vs or 0V), this applies even if that part of the IC is not being used in the circuit! NOT gate (inverter) The output Q is true when the input A is NOT true, the output is the inverse of the input: Q = NOT A A NOT gate can only have one input. A NOT gate is also called an inverter. AND gate The output Q is true if input A AND input B are both true: Q = A AND B An AND gate can have two or more inputs, its output is true if all inputs are true. NAND gate (NAND = Not AND) This is an AND gate with the output inverted, as shown by the 'o' on the output. The output is true if input A AND input B are NOT both true: Q = NOT (A AND B) A NAND gate can have two or more inputs, its output is true if NOT all inputs are true. OR gate The output Q is true if input A OR input B is true (or both of them are true): Q = A OR B An OR gate can have two or more inputs, its output is true if at least one input is true. NOR gate (NOR = Not OR) This is an OR gate with the output inverted, as shown by the 'o' on the output. The output Q is true if NOT inputs A OR B are true: Q = NOT (A OR B) A NOR gate can have two or more inputs, its output is true if no inputs are true. EX-OR (EXclusive-OR) gate The output Q is true if either input A is true OR input B is true, but not when both of them are true: Q = (A AND NOT B) OR (B AND NOT A) This is like an OR gate but excluding both inputs being true. The output is true if inputs A and B are DIFFERENT. EX-OR gates can only have 2 inputs.
  • 3. EX-NOR (EXclusive-NOR) gate This is an EX-OR gate with the output inverted, as shown by the 'o' on the output. The output Q is true if inputs A and B are the SAME (both true or both false): Q = (A AND B) OR (NOT A AND NOT B) EX-NOR gates can only have 2 inputs. Summary truth tables The summary truth tables below show the output states for all types of 2-input and 3-input gates. Summary for all 2-input gates Inputs Output of each gate A B AND NAND OR NOR EX-OR EX-NOR 0 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 Summary for all 3-input gates Inputs Output of each gate A B C AND NAND OR NOR 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 1 1 1 1 0 1 0 Note that EX-OR and EX-NOR gates can only have 2 inputs. Combinations of logic gates Logic gates can be combined to produce more complex functions. They can also be combined to substitute one type of gate for another. For example to produce an output Q which is true only when input A is true and input B is false, as shown in the truth table on the right, we can combine a NOT gate and an AND gate like this: Q = A AND NOT B Working out the function of a combination of gates Truth tables can be used to work out the function of a combination of gates. For example the truth table on the right show the intermediate outputs D and E as well as the final output Q for the system shown below. D = NOT (A OR B) E = B AND C Q = D OR E = (NOT (A OR B)) OR (B AND C) Input A Input B Output Q 0 0 0 0 1 0 1 0 1 1 1 0 Inputs Outputs A B C D E Q 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 1
  • 4. Substituting one type of gate for another Logic gates are available on ICs which usually contain several gates of the same type, for example four 2-input NAND gates or three 3-input NAND gates. This can be wasteful if only a few gates are required unless they are all the same type. To avoid using too many ICs you can reduce the number of gate inputs or substitute one type of gate for another. Reducing the number of inputs The number of inputs to a gate can be reduced by connecting two (or more) inputs together. The diagram shows a 3-input AND gate operating as a 2-input AND gate. Making a NOT gate from a NAND or NOR gate Reducing a NAND or NOR gate to just one input creates a NOT gate. The diagram shows this for a 2-input NAND gate. Any gate can be built from NAND or NOR gates As well as making a NOT gate, NAND or NOR gates can be combined to create any type of gate! This enables a circuit to be built from just one type of gate, either NAND or NOR. For example an AND gate is a NAND gate then a NOT gate (to undo the inverting function). Note that AND and OR gates cannot be used to create other gates because they lack the inverting (NOT) function. To change the type of gate, such as changing OR to AND, you must do three things: Invert (NOT) each input. Change the gate type (OR to AND, or AND to OR) Invert (NOT) the output. For example an OR gate can be built from NOTed inputs fed into a NAND (AND + NOT) gate. NAND gate equivalents The table below shows the NAND gate equivalents of NOT, AND, OR and NOR gates: Gate Equivalent in NAND gates NOT AND OR NOR Substituting gates in an example logic system The original system has 3 different gates: NOR, AND and OR. This requires three ICs (one for each type of gate). To re-design this system using NAND gates only begin by replacing each gate with its NAND gate equivalent, as shown in the diagram below.
  • 5. Then simplify the system by deleting adjacent pairs of NOT gates (marked X above). This can be done because the second NOT gate cancels the action of the first. The final system is shown on the right. It has five NAND gates and requires two ICs (with four gates on each IC). This is better than the original system which required three ICs (one for each type of gate). Substituting NAND (or NOR) gates does not always increase the number of gates, but when it does (as in this example) the increase is usually only one or two gates. The real benefit is reducing the number of ICs required by using just one type of gate.