SlideShare une entreprise Scribd logo
1  sur  10
Inheritance: Logic 
Gates and Circuits 
By: Giovannie Sanchez 
Kevin Flores
Important to know… 
• Inheritance - is the ability for one class to be 
related to another class. 
• The structure relationship is called inheritance 
hierarchy. 
• Lists, tuples, and strings are all types of 
sequential collections. 
• They all inherit common data and 
organization and operands 
Super 
Class 
•Logic Gate 
•Everyone Inherits the class. 
Class 
One 
•Binary Gate 
•Unary Gate 
Class 
Two 
•And Gate 
•Or Gate 
•Not Gate
What is Heriarchy? & 
What are we using? 
Heriarchy is used to simplify and to 
understand the relationship between 
inheritable classes. 
Its more organized.
The operands and, or… 
• And – has two inputs, and one output which 
can be either 0 (false) or 1(true). 
• Or – has two inputs and its output is either 
true (1) if a veritable solution is present out of 
the two inputs or its completely false. 
Or 
Gate 
Binary 
Gate 
Logic 
Gate 
• Method 
• Parameter 
And 
Gate 
Binary 
Gate • Method 
• Method 
• Parameter 
• Parameter 
Logic 
Gate
The operand or… 
• Not – has a single input and the output is 
always the opposite of the input. 
• Method 
• Parameter 
Not 
Gate 
Unary 
Gate • Method 
• Method 
• Parameter 
• Parameter 
Logic 
Gate
The Circuit… 
The output lines from the two AND gates feed directly 
into the OR gate, and the resulting output from the OR 
gate is given to the NOT gate. If we apply a set of input 
values to the four input lines (two for each AND gate), 
the values are processed and a result appears at the 
output of the NOT gate.
Let’s get started… 
LogicGate 
• At the top of the hierarchy, the 
LogicGate class represents the most 
general characteristics of logic 
gates: namely, a label for the gate 
and an output line. 
• The next level of subclasses breaks 
the logic gates into two families, 
those that have one input line and 
those that have two. Below that, the 
specific logic functions of each 
appear.
The Connectors…are… 
Connector Class 
• The Connector class will not reside 
in the gate hierarchy. 
• It will, however, use the gate 
hierarchy in that each connector will 
have two gates, one on either end. 
• This relationship is very important in 
object-oriented programming. It is 
called the HAS-A Relationship
Let’s look at the code… 
Source Code 
• 7 Classes 
• Each one inherit except the 
LogicGate and Connector 
Method Inherit 
Logic 
Gate 
3 NO 
Binary 
Gate 
4 YES 
Unary 
Gate 
3 YES 
And 
Gate 
2 YES 
Or 
Gate 
2 YES 
Not 
Gate 
2 YES 
Connector 3 NO

Contenu connexe

Tendances

Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Daniyal Mughal
 
Chapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of JavaChapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of JavaAdan Hubahib
 
Week 1: Getting Your Hands Dirty - Part 1
Week 1: Getting Your Hands Dirty - Part 1Week 1: Getting Your Hands Dirty - Part 1
Week 1: Getting Your Hands Dirty - Part 1Jamshid Hashimi
 
Rinke Owl Uml 20040428
Rinke Owl Uml 20040428Rinke Owl Uml 20040428
Rinke Owl Uml 20040428Rinke Hoekstra
 
Semantics analysis
Semantics analysisSemantics analysis
Semantics analysisBilalzafar22
 
Modeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By ApModeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By ApEr. Ashish Pandey
 
DIGITAL ELECTRONICS AND LOGIC DESIGN
DIGITAL ELECTRONICS AND LOGIC DESIGN DIGITAL ELECTRONICS AND LOGIC DESIGN
DIGITAL ELECTRONICS AND LOGIC DESIGN Uttam Singh
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite AutomataArchana Gopinath
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7ArraLafuente
 
Crystal: tipos, peculiaridades y desafios
Crystal: tipos, peculiaridades y desafiosCrystal: tipos, peculiaridades y desafios
Crystal: tipos, peculiaridades y desafiosBrian Cardiff
 
9781439035665 ppt ch02
9781439035665 ppt ch029781439035665 ppt ch02
9781439035665 ppt ch02Terry Yoast
 
Interfaces and abstract classes
Interfaces and abstract classesInterfaces and abstract classes
Interfaces and abstract classesAKANSH SINGHAL
 

Tendances (20)

Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6
 
Chapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of JavaChapter 2 - Basic Elements of Java
Chapter 2 - Basic Elements of Java
 
Week 1: Getting Your Hands Dirty - Part 1
Week 1: Getting Your Hands Dirty - Part 1Week 1: Getting Your Hands Dirty - Part 1
Week 1: Getting Your Hands Dirty - Part 1
 
Abstract class in java
Abstract class in javaAbstract class in java
Abstract class in java
 
Classroom Object Oriented Language (COOL)
Classroom Object Oriented Language (COOL)Classroom Object Oriented Language (COOL)
Classroom Object Oriented Language (COOL)
 
Rinke Owl Uml 20040428
Rinke Owl Uml 20040428Rinke Owl Uml 20040428
Rinke Owl Uml 20040428
 
Semantics analysis
Semantics analysisSemantics analysis
Semantics analysis
 
Modeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By ApModeling Style and Delay Model of VHDL By Ap
Modeling Style and Delay Model of VHDL By Ap
 
Self Taught Learning
Self Taught LearningSelf Taught Learning
Self Taught Learning
 
Semantic analysis
Semantic analysisSemantic analysis
Semantic analysis
 
DIGITAL ELECTRONICS AND LOGIC DESIGN
DIGITAL ELECTRONICS AND LOGIC DESIGN DIGITAL ELECTRONICS AND LOGIC DESIGN
DIGITAL ELECTRONICS AND LOGIC DESIGN
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7
 
Crystal: tipos, peculiaridades y desafios
Crystal: tipos, peculiaridades y desafiosCrystal: tipos, peculiaridades y desafios
Crystal: tipos, peculiaridades y desafios
 
9781439035665 ppt ch02
9781439035665 ppt ch029781439035665 ppt ch02
9781439035665 ppt ch02
 
Chap04
Chap04Chap04
Chap04
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
Interfaces and abstract classes
Interfaces and abstract classesInterfaces and abstract classes
Interfaces and abstract classes
 
SEARCHING
SEARCHINGSEARCHING
SEARCHING
 

En vedette

Higher Education Innovation & Open, Connected Learning: Back To The Future
Higher Education Innovation & Open, Connected Learning: Back To The FutureHigher Education Innovation & Open, Connected Learning: Back To The Future
Higher Education Innovation & Open, Connected Learning: Back To The FutureAntonio Vantaggiato
 
REP.01 NETW3205 Network Management
REP.01 NETW3205 Network ManagementREP.01 NETW3205 Network Management
REP.01 NETW3205 Network ManagementRicardo Pereira
 
3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patil3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
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
 

En vedette (6)

Infosec
InfosecInfosec
Infosec
 
flowChart
flowChartflowChart
flowChart
 
Higher Education Innovation & Open, Connected Learning: Back To The Future
Higher Education Innovation & Open, Connected Learning: Back To The FutureHigher Education Innovation & Open, Connected Learning: Back To The Future
Higher Education Innovation & Open, Connected Learning: Back To The Future
 
REP.01 NETW3205 Network Management
REP.01 NETW3205 Network ManagementREP.01 NETW3205 Network Management
REP.01 NETW3205 Network Management
 
3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patil3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patil
 
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.
 

Similaire à Python - Logic Gates

11_Fundamentals_of_Digital_Electronics_L.pptx
11_Fundamentals_of_Digital_Electronics_L.pptx11_Fundamentals_of_Digital_Electronics_L.pptx
11_Fundamentals_of_Digital_Electronics_L.pptxElisée Ndjabu
 
Learning core java
Learning core javaLearning core java
Learning core javaAbhay Bharti
 
Intro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.pptIntro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.pptArksJava2
 
Preparing Java 7 Certifications
Preparing Java 7 CertificationsPreparing Java 7 Certifications
Preparing Java 7 CertificationsGiacomo Veneri
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptxPooja Dixit
 
Number System & Logic Gate
Number System & Logic GateNumber System & Logic Gate
Number System & Logic GateAshfakur Rahman
 
Computer logic and gates
Computer logic and gatesComputer logic and gates
Computer logic and gatessamina khan
 
Natural Language Query to SQL conversion using Machine Learning Approach
Natural Language Query to SQL conversion using Machine Learning ApproachNatural Language Query to SQL conversion using Machine Learning Approach
Natural Language Query to SQL conversion using Machine Learning ApproachMinhazul Arefin
 
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.pdfKINGZzofYouTube
 
6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.pptnaghamallella
 
basic logic gate presentation date23.ppt
basic logic gate presentation date23.pptbasic logic gate presentation date23.ppt
basic logic gate presentation date23.pptnaghamallella
 
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptxa581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptxchristinamary2620
 
Decision Trees - The Machine Learning Magic Unveiled
Decision Trees - The Machine Learning Magic UnveiledDecision Trees - The Machine Learning Magic Unveiled
Decision Trees - The Machine Learning Magic UnveiledLuca Zavarella
 

Similaire à Python - Logic Gates (20)

Java Datatypes
Java DatatypesJava Datatypes
Java Datatypes
 
Computer architecture 1
Computer architecture  1Computer architecture  1
Computer architecture 1
 
11_Fundamentals_of_Digital_Electronics_L.pptx
11_Fundamentals_of_Digital_Electronics_L.pptx11_Fundamentals_of_Digital_Electronics_L.pptx
11_Fundamentals_of_Digital_Electronics_L.pptx
 
Learning core java
Learning core javaLearning core java
Learning core java
 
Intro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.pptIntro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.ppt
 
Preparing Java 7 Certifications
Preparing Java 7 CertificationsPreparing Java 7 Certifications
Preparing Java 7 Certifications
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
 
Number System & Logic Gate
Number System & Logic GateNumber System & Logic Gate
Number System & Logic Gate
 
Computer logic and gates
Computer logic and gatesComputer logic and gates
Computer logic and gates
 
Natural Language Query to SQL conversion using Machine Learning Approach
Natural Language Query to SQL conversion using Machine Learning ApproachNatural Language Query to SQL conversion using Machine Learning Approach
Natural Language Query to SQL conversion using Machine Learning Approach
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Basic Logic Gates
Basic Logic GatesBasic Logic Gates
Basic Logic Gates
 
Logic gates
Logic gatesLogic gates
Logic gates
 
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
 
6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt
 
basic logic gate presentation date23.ppt
basic logic gate presentation date23.pptbasic logic gate presentation date23.ppt
basic logic gate presentation date23.ppt
 
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptxa581a6a2cb5778045788f0b1d7da1c0236f.pptx
a581a6a2cb5778045788f0b1d7da1c0236f.pptx
 
Decision Trees - The Machine Learning Magic Unveiled
Decision Trees - The Machine Learning Magic UnveiledDecision Trees - The Machine Learning Magic Unveiled
Decision Trees - The Machine Learning Magic Unveiled
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Logic gates 1
Logic gates 1Logic gates 1
Logic gates 1
 

Dernier

AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfSkillCertProExams
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...amilabibi1
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaKayode Fayemi
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Vipesco
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIINhPhngng3
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Delhi Call girls
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfSenaatti-kiinteistöt
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Pooja Nehwal
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lodhisaajjda
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Baileyhlharris
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar TrainingKylaCullinane
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalFabian de Rijk
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCamilleBoulbin1
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatmentnswingard
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoKayode Fayemi
 
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedDelhi Call girls
 

Dernier (18)

AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
Bring back lost lover in USA, Canada ,Uk ,Australia ,London Lost Love Spell C...
 
If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
Aesthetic Colaba Mumbai Cst Call girls 📞 7738631006 Grant road Call Girls ❤️-...
 
ICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdfICT role in 21st century education and it's challenges.pdf
ICT role in 21st century education and it's challenges.pdf
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Digital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of DrupalDigital collaboration with Microsoft 365 as extension of Drupal
Digital collaboration with Microsoft 365 as extension of Drupal
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verifiedSector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
Sector 62, Noida Call girls :8448380779 Noida Escorts | 100% verified
 

Python - Logic Gates

  • 1. Inheritance: Logic Gates and Circuits By: Giovannie Sanchez Kevin Flores
  • 2. Important to know… • Inheritance - is the ability for one class to be related to another class. • The structure relationship is called inheritance hierarchy. • Lists, tuples, and strings are all types of sequential collections. • They all inherit common data and organization and operands Super Class •Logic Gate •Everyone Inherits the class. Class One •Binary Gate •Unary Gate Class Two •And Gate •Or Gate •Not Gate
  • 3. What is Heriarchy? & What are we using? Heriarchy is used to simplify and to understand the relationship between inheritable classes. Its more organized.
  • 4. The operands and, or… • And – has two inputs, and one output which can be either 0 (false) or 1(true). • Or – has two inputs and its output is either true (1) if a veritable solution is present out of the two inputs or its completely false. Or Gate Binary Gate Logic Gate • Method • Parameter And Gate Binary Gate • Method • Method • Parameter • Parameter Logic Gate
  • 5. The operand or… • Not – has a single input and the output is always the opposite of the input. • Method • Parameter Not Gate Unary Gate • Method • Method • Parameter • Parameter Logic Gate
  • 6.
  • 7. The Circuit… The output lines from the two AND gates feed directly into the OR gate, and the resulting output from the OR gate is given to the NOT gate. If we apply a set of input values to the four input lines (two for each AND gate), the values are processed and a result appears at the output of the NOT gate.
  • 8. Let’s get started… LogicGate • At the top of the hierarchy, the LogicGate class represents the most general characteristics of logic gates: namely, a label for the gate and an output line. • The next level of subclasses breaks the logic gates into two families, those that have one input line and those that have two. Below that, the specific logic functions of each appear.
  • 9. The Connectors…are… Connector Class • The Connector class will not reside in the gate hierarchy. • It will, however, use the gate hierarchy in that each connector will have two gates, one on either end. • This relationship is very important in object-oriented programming. It is called the HAS-A Relationship
  • 10. Let’s look at the code… Source Code • 7 Classes • Each one inherit except the LogicGate and Connector Method Inherit Logic Gate 3 NO Binary Gate 4 YES Unary Gate 3 YES And Gate 2 YES Or Gate 2 YES Not Gate 2 YES Connector 3 NO