SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
Page 1 of 8
1.3 Hardware and software
1.3.1 Logic gates
Logic gates serve as the building blocks to digital logic circuits using combinational logic. Many electronic
circuits operate using binary logic gates. Logic gates basically process signals which represent true or false or
the equivalent i.e. ON or OFF, 1 or 0
Whilst there are a number of logic gates, only the six simplest are covered in this booklet:
1. NOT gate
2. AND gate
3. OR gate
4. NAND gate
5. NOR gate
6. XOR gate.
The following notes describe the function of all six gates, how to produce truth tables, how to design networks
using logic gates, and how to determine the output from a logic network
The six main logic gates
The most common symbols used to represent logic gates are shown below. To avoid confusion the graphical
representations will be used in exam questions but candidates may use either set of symbols when answering
questions.
Simple graphical representation
AND NOT NOR XOR
C
NANDOR
Page 2 of 8
1.3 Hardware and software
1.3.1 Logic gates
Symbols used to represent logic gates
Page 3 of 8
1.3 Hardware and software
1.3.1 Logic gates
A Truth Table is simply a table listing all the combinations of inputs and their respective outputs.
The NOT gate has only one input, but the rest have 2 inputs.
The next section describes the function of all six logic gates.
Name Symbol Logic Truth Table
NOT GATE
The output (called X)
is true (i.e.1 or ON)
when the INPUT A is
NOT TRUE (i.e. 0 or
OFF)
AND GATE
The output is only
true (i.e.1 or ON)
when the
(INPUT A AND INPUT
B) are both TRUE
(i.e. 0 or OFF)
OR GATE
The output is true
(i.e.1 or ON) if (INPUT
A OR INPUT B) are
TRUE (i.e. 0 or OFF)
NAND GATE
This is basically an
AND gate with the
output inverted
The output is
true(i.e.1 or ON) if
(INPUT A AND INPUT
B) are NOT both
TRUE (i.e. 0 or OFF)
NOR GATE
This is basically an OR
gate with the output
inverted
The output is true
(i.e.1 or ON) if
NOT(INPUT A AND
INPUT B) are TRUE
EXCLUSIVE-OR
GATE
(XOR GATE)
The output is true
only when the inputs
are opposite of each
other
Page 4 of 8
1.3 Hardware and software
1.3.1 Logic gates
The tables above containing 1s and 0s are known as truth tables and are an integral part of logic gates
functionality. These are used extensively throughout this booklet in the design and testing of logic networks
built up from logic gates.
Combinations of logic gates
It is possible to combine logic gates together to produce more complex logic networks.
This booklet will only deal with a maximum of three inputs and up to six logic gates. The output from a logic
network is checked by producing the truth table (as shown in the examples below).
We will deal with two different scenarios here. The first involves drawing the truth table from a given logic
network and the second involves designing a logic network for a given problem and then testing it by drawing
the truth table.
Page 5 of 8
1.3 Hardware and software
1.3.1 Logic gates
Producing the truth table from a given logic network
Consider the following logic network which contains three inputs and three logic gates:
If we now look at the output in two stages. First let us consider the outputs being produced at stages “S” and
“T”. To do this, we need to draw a truth table. There are three inputs (A, B and C) which gives 23 (i.e. 8)
possible combinations of 1s and 0s. To work out the outputs at “S” and “T” we need to refer to the truth tables
for the NOR gate and for the AND gate. For example, when A = 1 and B = 1 then we have 1 NOR 1 which
gives the value of S = 0. Continuing doing the same thing for all 8 possible inputs we get the following
interim truth table:
Page 6 of 8
1.3 Hardware and software
1.3.1 Logic gates
Designing logic networks to solve a specific problem and testing using truth tables
Consider the following problem:
“If button A or button B are on and button C is off then the alarm X goes on”
We can convert this into logic gate terminology (ON = 1 and OFF = 0):
If (A = 1 OR B = 1) AND (C = NOT 1) then (X = 1)
(Notice: rather than write 0 we use NOT 1)
To draw the logic network, we do each part in brackets first i.e. A = 1 OR B = 1 is one gate then C = NOT 1 is
the second gate. These are then joined together by the AND gate. Once the logic network is drawn we can
then test it using a truth table. Remember the original problem – we are looking for the output to be 1 when A
or B is 1 and when C is 0. Thus we get the following logic network and truth table from the network. Looking
at the values in the truth table, we will be able to clearly see that it matches up with the original problem
which then gives us confidence that the logic network is correct.
Page 7 of 8
1.3 Hardware and software
1.3.1 Logic gates
Let us now consider a second problem:
A steel rolling mill is to be controlled by a logic network made up of AND, OR and NOT gates only. The mill
receives a stop signal (i.e. S = 1) depending on the following input bits:
A stop signal (S = 1) occurs when:
Either Length, L > 100 meters and Velocity, V < 10 m/s
Or Temperature, T < 1000 C and Velocity, V > 10 m/s
Draw a logic network and truth table to show all the possible situations when the stop signal could be
received.
The first thing to do is to try and turn the question into a series of logic gates and then the problem becomes
much simplified.
The first statement can be re-written as: (L = 1 AND V = NOT 1) since Length > 100 meters
corresponds to a binary value of 1 and Velocity < 10 m/s corresponds to a binary value of 0 (i.e. NOT
1).
The second statement can be re-written as (T = NOT 1 AND V = 1) since Temperature < 1000C
corresponds to a binary value of 0 (i.e. NOT 1) and Velocity > 10 m/s corresponds to a binary value
of 1
Both these statements are joined together by OR which gives us the logic statement:
if (L = 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1) then S = 1
Page 8 of 8
1.3 Hardware and software
1.3.1 Logic gates
We can now draw the logic network and truth table to give the solution to the original problem (input L has
been put at the bottom of the diagram just to avoid crossing over of lines; it merely makes it look neater and
less complex and isn’t essential):

Weitere ähnliche Inhalte

Was ist angesagt?

Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming ConceptsJussi Pohjolainen
 
Unix system programming
Unix system programmingUnix system programming
Unix system programmingSyed Mustafa
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-busAnuj Modi
 
Decision and looping examples with php (WT)
Decision and looping examples with php (WT)Decision and looping examples with php (WT)
Decision and looping examples with php (WT)kunjan shah
 
A GraphQL approach to Healthcare Information Exchange with HL7 FHIR
A GraphQL approach to Healthcare Information Exchange with HL7 FHIRA GraphQL approach to Healthcare Information Exchange with HL7 FHIR
A GraphQL approach to Healthcare Information Exchange with HL7 FHIRSuresh KUMAR Mukhiya
 
computer-organization-and-architecture-9780070083332-0070083339_compress.pdf
computer-organization-and-architecture-9780070083332-0070083339_compress.pdfcomputer-organization-and-architecture-9780070083332-0070083339_compress.pdf
computer-organization-and-architecture-9780070083332-0070083339_compress.pdfSumitSamanta16
 
SystemC Tutorial
SystemC TutorialSystemC Tutorial
SystemC Tutorialkocha2012
 
बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में Chand Rook
 
ChatGPT For Business Use
ChatGPT For Business UseChatGPT For Business Use
ChatGPT For Business UseSanjay Willie
 
[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...
[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...
[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...CODE BLUE
 
實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DH
實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DH實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DH
實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DHIttrainingIttraining
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdfGetting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdfManish Chopra
 
Conditional Statement in C#
Conditional Statement in C#Conditional Statement in C#
Conditional Statement in C#Simplilearn
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CSyed Mustafa
 
Decision making and loop in C#
Decision making and loop in C#Decision making and loop in C#
Decision making and loop in C#Prasanna Kumar SM
 

Was ist angesagt? (20)

Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
 
Open AI Chat GPT.
Open AI Chat GPT.Open AI Chat GPT.
Open AI Chat GPT.
 
Unix system programming
Unix system programmingUnix system programming
Unix system programming
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-bus
 
Lesson 5 php operators
Lesson 5   php operatorsLesson 5   php operators
Lesson 5 php operators
 
Decision and looping examples with php (WT)
Decision and looping examples with php (WT)Decision and looping examples with php (WT)
Decision and looping examples with php (WT)
 
A GraphQL approach to Healthcare Information Exchange with HL7 FHIR
A GraphQL approach to Healthcare Information Exchange with HL7 FHIRA GraphQL approach to Healthcare Information Exchange with HL7 FHIR
A GraphQL approach to Healthcare Information Exchange with HL7 FHIR
 
computer-organization-and-architecture-9780070083332-0070083339_compress.pdf
computer-organization-and-architecture-9780070083332-0070083339_compress.pdfcomputer-organization-and-architecture-9780070083332-0070083339_compress.pdf
computer-organization-and-architecture-9780070083332-0070083339_compress.pdf
 
Web technology today
Web technology todayWeb technology today
Web technology today
 
SystemC Tutorial
SystemC TutorialSystemC Tutorial
SystemC Tutorial
 
C programming
C programming C programming
C programming
 
बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में
 
ChatGPT For Business Use
ChatGPT For Business UseChatGPT For Business Use
ChatGPT For Business Use
 
[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...
[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...
[CB16] (物理的に分離された)エアギャップのセキュリティ:最先端の攻撃、分析、および軽減 by Mordechai Guri, Yisroel Mi...
 
實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DH
實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DH實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DH
實作Linux Driver移植在樹莓 Pi上:Linux Driver for STMicro LIS3DH
 
Getting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdfGetting Started with ChatGPT.pdf
Getting Started with ChatGPT.pdf
 
Javascript
JavascriptJavascript
Javascript
 
Conditional Statement in C#
Conditional Statement in C#Conditional Statement in C#
Conditional Statement in C#
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in C
 
Decision making and loop in C#
Decision making and loop in C#Decision making and loop in C#
Decision making and loop in C#
 

Ähnlich wie logic gates By ZAK (20)

Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
 
9. logic gates._rr
9. logic gates._rr9. logic gates._rr
9. logic gates._rr
 
DE notes
DE notesDE notes
DE notes
 
Logic Gate.pptx
Logic Gate.pptxLogic Gate.pptx
Logic Gate.pptx
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
class xi pptx-1.pptx
class xi pptx-1.pptxclass xi pptx-1.pptx
class xi pptx-1.pptx
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Logic gates i & ii
Logic gates i & iiLogic gates i & ii
Logic gates i & ii
 
Chapter 5 boolean algebra
Chapter 5 boolean algebraChapter 5 boolean algebra
Chapter 5 boolean algebra
 
Digital logic Gates of Computer Science
Digital logic Gates of Computer ScienceDigital logic Gates of Computer Science
Digital logic Gates of Computer Science
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptx
 
BOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.pptBOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.ppt
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
 
Deld lab manual
Deld lab manualDeld lab manual
Deld lab manual
 
Chapter 2 Boolean Algebra.pptx
Chapter 2 Boolean Algebra.pptxChapter 2 Boolean Algebra.pptx
Chapter 2 Boolean Algebra.pptx
 
OR, AND, NOT Gates
OR, AND, NOT GatesOR, AND, NOT Gates
OR, AND, NOT Gates
 
Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.
 
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
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Digital logic
Digital logicDigital logic
Digital logic
 

Mehr von Tabsheer Hasan

Lab Network Settings And Testing
Lab Network Settings And TestingLab Network Settings And Testing
Lab Network Settings And TestingTabsheer Hasan
 
How to train cortana to respond to your voice
How to train cortana to respond to your voiceHow to train cortana to respond to your voice
How to train cortana to respond to your voiceTabsheer Hasan
 
How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10Tabsheer Hasan
 
How to pin cortana to your taskbar on
How to pin cortana to your taskbar on How to pin cortana to your taskbar on
How to pin cortana to your taskbar on Tabsheer Hasan
 
Introduction To Computer
Introduction To ComputerIntroduction To Computer
Introduction To ComputerTabsheer Hasan
 
How to set up cortana on windows 10
How to set up cortana on windows 10How to set up cortana on windows 10
How to set up cortana on windows 10Tabsheer Hasan
 
Data structures; arrays By ZAK
Data structures; arrays By ZAKData structures; arrays By ZAK
Data structures; arrays By ZAKTabsheer Hasan
 
Programming concepts By ZAK
Programming concepts By ZAKProgramming concepts By ZAK
Programming concepts By ZAKTabsheer Hasan
 
problem solving and design By ZAK
problem solving and design By ZAKproblem solving and design By ZAK
problem solving and design By ZAKTabsheer Hasan
 
operating systems By ZAK
operating systems By ZAKoperating systems By ZAK
operating systems By ZAKTabsheer Hasan
 
memory, storage devices and media By ZAK
memory, storage devices and media By ZAKmemory, storage devices and media By ZAK
memory, storage devices and media By ZAKTabsheer Hasan
 
1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAKTabsheer Hasan
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKTabsheer Hasan
 
internet principles of operation By ZAK
internet principles of operation By ZAKinternet principles of operation By ZAK
internet principles of operation By ZAKTabsheer Hasan
 

Mehr von Tabsheer Hasan (20)

Lab Network Settings And Testing
Lab Network Settings And TestingLab Network Settings And Testing
Lab Network Settings And Testing
 
How to train cortana to respond to your voice
How to train cortana to respond to your voiceHow to train cortana to respond to your voice
How to train cortana to respond to your voice
 
How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10
 
How to pin cortana to your taskbar on
How to pin cortana to your taskbar on How to pin cortana to your taskbar on
How to pin cortana to your taskbar on
 
Introduction To Computer
Introduction To ComputerIntroduction To Computer
Introduction To Computer
 
How to set up cortana on windows 10
How to set up cortana on windows 10How to set up cortana on windows 10
How to set up cortana on windows 10
 
2210 s15 qp_ms_er_12
2210 s15 qp_ms_er_122210 s15 qp_ms_er_12
2210 s15 qp_ms_er_12
 
Databases By ZAK
Databases By ZAKDatabases By ZAK
Databases By ZAK
 
Data structures; arrays By ZAK
Data structures; arrays By ZAKData structures; arrays By ZAK
Data structures; arrays By ZAK
 
Programming concepts By ZAK
Programming concepts By ZAKProgramming concepts By ZAK
Programming concepts By ZAK
 
Pseudocode By ZAK
Pseudocode By ZAKPseudocode By ZAK
Pseudocode By ZAK
 
problem solving and design By ZAK
problem solving and design By ZAKproblem solving and design By ZAK
problem solving and design By ZAK
 
Ethics By ZAK
Ethics By ZAKEthics By ZAK
Ethics By ZAK
 
security By ZAK
security By ZAKsecurity By ZAK
security By ZAK
 
operating systems By ZAK
operating systems By ZAKoperating systems By ZAK
operating systems By ZAK
 
memory, storage devices and media By ZAK
memory, storage devices and media By ZAKmemory, storage devices and media By ZAK
memory, storage devices and media By ZAK
 
input devices By ZAK
input devices By ZAKinput devices By ZAK
input devices By ZAK
 
1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK1.3.2 computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAK
 
internet principles of operation By ZAK
internet principles of operation By ZAKinternet principles of operation By ZAK
internet principles of operation By ZAK
 

Kürzlich hochgeladen

Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 

Kürzlich hochgeladen (20)

Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 

logic gates By ZAK

  • 1. Page 1 of 8 1.3 Hardware and software 1.3.1 Logic gates Logic gates serve as the building blocks to digital logic circuits using combinational logic. Many electronic circuits operate using binary logic gates. Logic gates basically process signals which represent true or false or the equivalent i.e. ON or OFF, 1 or 0 Whilst there are a number of logic gates, only the six simplest are covered in this booklet: 1. NOT gate 2. AND gate 3. OR gate 4. NAND gate 5. NOR gate 6. XOR gate. The following notes describe the function of all six gates, how to produce truth tables, how to design networks using logic gates, and how to determine the output from a logic network The six main logic gates The most common symbols used to represent logic gates are shown below. To avoid confusion the graphical representations will be used in exam questions but candidates may use either set of symbols when answering questions. Simple graphical representation AND NOT NOR XOR C NANDOR
  • 2. Page 2 of 8 1.3 Hardware and software 1.3.1 Logic gates Symbols used to represent logic gates
  • 3. Page 3 of 8 1.3 Hardware and software 1.3.1 Logic gates A Truth Table is simply a table listing all the combinations of inputs and their respective outputs. The NOT gate has only one input, but the rest have 2 inputs. The next section describes the function of all six logic gates. Name Symbol Logic Truth Table NOT GATE The output (called X) is true (i.e.1 or ON) when the INPUT A is NOT TRUE (i.e. 0 or OFF) AND GATE The output is only true (i.e.1 or ON) when the (INPUT A AND INPUT B) are both TRUE (i.e. 0 or OFF) OR GATE The output is true (i.e.1 or ON) if (INPUT A OR INPUT B) are TRUE (i.e. 0 or OFF) NAND GATE This is basically an AND gate with the output inverted The output is true(i.e.1 or ON) if (INPUT A AND INPUT B) are NOT both TRUE (i.e. 0 or OFF) NOR GATE This is basically an OR gate with the output inverted The output is true (i.e.1 or ON) if NOT(INPUT A AND INPUT B) are TRUE EXCLUSIVE-OR GATE (XOR GATE) The output is true only when the inputs are opposite of each other
  • 4. Page 4 of 8 1.3 Hardware and software 1.3.1 Logic gates The tables above containing 1s and 0s are known as truth tables and are an integral part of logic gates functionality. These are used extensively throughout this booklet in the design and testing of logic networks built up from logic gates. Combinations of logic gates It is possible to combine logic gates together to produce more complex logic networks. This booklet will only deal with a maximum of three inputs and up to six logic gates. The output from a logic network is checked by producing the truth table (as shown in the examples below). We will deal with two different scenarios here. The first involves drawing the truth table from a given logic network and the second involves designing a logic network for a given problem and then testing it by drawing the truth table.
  • 5. Page 5 of 8 1.3 Hardware and software 1.3.1 Logic gates Producing the truth table from a given logic network Consider the following logic network which contains three inputs and three logic gates: If we now look at the output in two stages. First let us consider the outputs being produced at stages “S” and “T”. To do this, we need to draw a truth table. There are three inputs (A, B and C) which gives 23 (i.e. 8) possible combinations of 1s and 0s. To work out the outputs at “S” and “T” we need to refer to the truth tables for the NOR gate and for the AND gate. For example, when A = 1 and B = 1 then we have 1 NOR 1 which gives the value of S = 0. Continuing doing the same thing for all 8 possible inputs we get the following interim truth table:
  • 6. Page 6 of 8 1.3 Hardware and software 1.3.1 Logic gates Designing logic networks to solve a specific problem and testing using truth tables Consider the following problem: “If button A or button B are on and button C is off then the alarm X goes on” We can convert this into logic gate terminology (ON = 1 and OFF = 0): If (A = 1 OR B = 1) AND (C = NOT 1) then (X = 1) (Notice: rather than write 0 we use NOT 1) To draw the logic network, we do each part in brackets first i.e. A = 1 OR B = 1 is one gate then C = NOT 1 is the second gate. These are then joined together by the AND gate. Once the logic network is drawn we can then test it using a truth table. Remember the original problem – we are looking for the output to be 1 when A or B is 1 and when C is 0. Thus we get the following logic network and truth table from the network. Looking at the values in the truth table, we will be able to clearly see that it matches up with the original problem which then gives us confidence that the logic network is correct.
  • 7. Page 7 of 8 1.3 Hardware and software 1.3.1 Logic gates Let us now consider a second problem: A steel rolling mill is to be controlled by a logic network made up of AND, OR and NOT gates only. The mill receives a stop signal (i.e. S = 1) depending on the following input bits: A stop signal (S = 1) occurs when: Either Length, L > 100 meters and Velocity, V < 10 m/s Or Temperature, T < 1000 C and Velocity, V > 10 m/s Draw a logic network and truth table to show all the possible situations when the stop signal could be received. The first thing to do is to try and turn the question into a series of logic gates and then the problem becomes much simplified. The first statement can be re-written as: (L = 1 AND V = NOT 1) since Length > 100 meters corresponds to a binary value of 1 and Velocity < 10 m/s corresponds to a binary value of 0 (i.e. NOT 1). The second statement can be re-written as (T = NOT 1 AND V = 1) since Temperature < 1000C corresponds to a binary value of 0 (i.e. NOT 1) and Velocity > 10 m/s corresponds to a binary value of 1 Both these statements are joined together by OR which gives us the logic statement: if (L = 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1) then S = 1
  • 8. Page 8 of 8 1.3 Hardware and software 1.3.1 Logic gates We can now draw the logic network and truth table to give the solution to the original problem (input L has been put at the bottom of the diagram just to avoid crossing over of lines; it merely makes it look neater and less complex and isn’t essential):