SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

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
 

What's hot (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
 

Viewers also liked

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
 

Viewers also liked (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.
 

Similar to 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
 

Similar to 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
 

Recently uploaded

ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxNikitaBankoti2
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Hasting Chen
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesPooja Nehwal
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsaqsarehman5055
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyPooja Nehwal
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxmohammadalnahdi22
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMoumonDas2
 
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
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxraffaeleoman
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Chameera Dedduwage
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardsticksaastr
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...Sheetaleventcompany
 
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
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024eCommerce Institute
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024eCommerce Institute
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar TrainingKylaCullinane
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubssamaasim06
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Delhi Call girls
 

Recently uploaded (20)

ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
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
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
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
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 

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