SlideShare a Scribd company logo
1 of 25
Computer Science 101
Logic Gates and Simple Circuits
Transistor - Electronic Switch


Collector




Base
Switch

Emitter




Base High (+5v or 1)
Makes connection
Base Low (0v or 0)
Disconnects
Say, 500 million
transistors on a chip 1
cm2
Change states in
billionth of sec
Solid state
Moore’s Law

In 1965, Intel co-founder Gordon
Moore saw the future. His prediction,
now popularly known as Moore's
Law, states that the number of
transistors on a chip doubles about
every two years.
Gates



A gate is an electronic device that takes
0/1 inputs and produces a 0/1 result.
NOT Gate


Output

Input



Input Low (0v or 0)
Output High (+5v or 1)



+5v

Input High (+5v or 1)
Output Low (0v or 0)

Output is opposite of
Input

NOT Gate

Ground
A

_
A
AND Gate


Output is 1 only if
• Input-1 is 1 and
• Input-2 is 1



+5v

Output
= Input1 AND Input2

Input-1

AND Gate
A

Input-2

B
Output

AB
OR Gate


• A is 1 or if
• B is 1

+5v


A

Output is 1 if

Output
= A OR B

B
OR Gate
A
Output

B

A+B
Boolean Expression


Python

Logical operators
• AND
• OR
• NOT

and (Python)
or (Python)
not (Python)



NOT ((x>y) AND ((x=5) OR (y=3))



not((x>y) and ((x==5)or(y==3)))



while (not((x>y) and ((x==5)or(y==3)))) :
…
Abstraction


In computer science, the term abstraction refers to
the practice of defining and using objects or
systems based on the high level functions they
provide.



We suppress the fine details of how these functions
are carried out or implemented.



In this way, we are able to focus on the big picture.



If the implementation changes, our high level work
is not affected.
Abstraction Examples


Boolean algebra - we can work with the
Boolean expressions knowing only the
properties or laws - we do not need to
know the details of what the variables
represent.



Gates - we can work with the logic gates
knowing only their function (output is 1
only if inputs are …). Don’t have to know
how gate is constructed from transistors.
Boolean Exp


Logic Circuit

To draw a circuit from a Boolean expression:
• From the left, make an input line for each variable.
• Next, put a NOT gate in for each variable that appears
negated in the expression.
• Still working from left to right, build up circuits for the
subexpressions, from simple to complex.
Logic Circuit: _ ____
AB+(A+B)B
Input Lines for Variables

A
B
Logic Circuit: _ ____
AB+(A+B)B
NOT Gate for B

A
B

_
B
Logic Circuit: _ ____
AB+(A+B)B
_
Subexpression AB
_
AB
A
B

_
B
Logic Circuit: _ ____
AB+(A+B)B
Subexpression A+B
_
AB
A
A+B

B

_
B
Logic Circuit: _ ____
AB+(A+B)B
___
Subexpression A+B
_
AB
A
A+B

B

_
B

____
A+B
Logic Circuit: _ ____
AB+(A+B)B
___
Subexpression (A+B)B
_
AB
A
A+B

B

_
B

____
A+B
____
(A+B)B
Logic Circuit: _ ____
AB+(A+B)B
Entire Expression
_
AB
A
A+B

B

_
B

____
A+B
____
(A+B)B
Logic Circuit

Boolean Exp



In the opposite direction, given a logic circuit, we
can write a Boolean expression for the circuit.



First we label each input line as a variable.



Then we move from the inputs labeling the
outputs from the gates.



As soon as the input lines to a gate are
labeled, we can label the output line.



The label on the circuit output is the result.
Logic Circuit

Boolean Exp
_
_ _
AB AB+AB

A
_
A
B
_
B

_
AB

A+B
Entire Expression

______
_ _
(AB+AB)(A+B)

______
_ _
AB+AB
Simplification Revisited


Once we have the BE for the
circuit, perhaps we can simplify.
AB

AB A

B

A B AB A

B

A

B A

B A

A

B A

BB

A

B A

AA
AB

BA

B
Logic Circuit

Reduces to:

Boolean Exp
The Boolean Triangle
Boolean
Expression

Logic
Circuit

Truth
Table
The Boolean Triangle
Boolean
Expression

Logic
Circuit

Truth
Table
Logic gates

More Related Content

What's hot

Presentation of gate
Presentation of gatePresentation of gate
Presentation of gatearun_supremo
 
Basic Gates in Digital Logic
Basic Gates in Digital LogicBasic Gates in Digital Logic
Basic Gates in Digital LogicISMT College
 
CSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesCSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesKevin Small
 
Logic gates for seminar purpose and easy to understand
Logic gates for seminar purpose and easy to understandLogic gates for seminar purpose and easy to understand
Logic gates for seminar purpose and easy to understandSwaraj Nayak
 
Digital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan
Digital Logic & Computer Architecture Practical Book by Yasir Ahmed KhanDigital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan
Digital Logic & Computer Architecture Practical Book by Yasir Ahmed KhanYasir Khan
 
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
 
Computer logic and gates
Computer logic and gatesComputer logic and gates
Computer logic and gatessamina khan
 
7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)Hemant Suthar
 
basic logic gates
 basic logic gates basic logic gates
basic logic gatesvishal gupta
 
Basic gates and functions
Basic gates and functionsBasic gates and functions
Basic gates and functionspong_sk1
 
Exclusive OR GAte
Exclusive OR GAteExclusive OR GAte
Exclusive OR GAteawais ahmad
 
Digital logic gates
Digital logic gatesDigital logic gates
Digital logic gatesjsearle11
 

What's hot (20)

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
 
Presentation of gate
Presentation of gatePresentation of gate
Presentation of gate
 
Basic Gates in Digital Logic
Basic Gates in Digital LogicBasic Gates in Digital Logic
Basic Gates in Digital Logic
 
CSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic GatesCSEC Physics Review - Introduction To Logic Gates
CSEC Physics Review - Introduction To Logic Gates
 
Logic gates for seminar purpose and easy to understand
Logic gates for seminar purpose and easy to understandLogic gates for seminar purpose and easy to understand
Logic gates for seminar purpose and easy to understand
 
Digital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan
Digital Logic & Computer Architecture Practical Book by Yasir Ahmed KhanDigital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan
Digital Logic & Computer Architecture Practical Book by Yasir Ahmed Khan
 
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.
 
Computer logic and gates
Computer logic and gatesComputer logic and gates
Computer logic and gates
 
7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)7 realization of logic function using logic gates (1)
7 realization of logic function using logic gates (1)
 
basic logic gates
 basic logic gates basic logic gates
basic logic gates
 
Digital Basics
Digital BasicsDigital Basics
Digital Basics
 
Basic gates and functions
Basic gates and functionsBasic gates and functions
Basic gates and functions
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic logic gates
 
Exclusive OR GAte
Exclusive OR GAteExclusive OR GAte
Exclusive OR GAte
 
Digital logic gates
Digital logic gatesDigital logic gates
Digital logic gates
 
LOGIC GATES
LOGIC GATESLOGIC GATES
LOGIC GATES
 
Logical Gates
Logical GatesLogical Gates
Logical Gates
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Logic gate
Logic gateLogic gate
Logic gate
 

Viewers also liked

Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL Amr Rashed
 
Boolean algebra And Logic Gates
Boolean algebra And Logic GatesBoolean algebra And Logic Gates
Boolean algebra And Logic GatesKumar
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebragavhays
 
Report on-the-logic-gates
Report on-the-logic-gatesReport on-the-logic-gates
Report on-the-logic-gatesbhardubhai
 
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsCOMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsVanitha Chandru
 
Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1Qundeel
 
Logic gate class 12
Logic gate class 12Logic gate class 12
Logic gate class 12Nipun Shah
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebraGagan Deep
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic logic gatesKumar
 
CBSE XII Boolean Algebra
CBSE XII Boolean AlgebraCBSE XII Boolean Algebra
CBSE XII Boolean AlgebraGuru Ji
 
ROM(Read Only Memory )
ROM(Read Only Memory )ROM(Read Only Memory )
ROM(Read Only Memory )rohitladdu
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...SlideShare
 

Viewers also liked (15)

Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
 
Boolean algebra And Logic Gates
Boolean algebra And Logic GatesBoolean algebra And Logic Gates
Boolean algebra And Logic Gates
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
Report on-the-logic-gates
Report on-the-logic-gatesReport on-the-logic-gates
Report on-the-logic-gates
 
BOOLEAN ALGEBRA & LOGIC GATE
BOOLEAN ALGEBRA & LOGIC GATEBOOLEAN ALGEBRA & LOGIC GATE
BOOLEAN ALGEBRA & LOGIC GATE
 
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsCOMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
 
Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1Ch4 Boolean Algebra And Logic Simplication1
Ch4 Boolean Algebra And Logic Simplication1
 
Logic gate class 12
Logic gate class 12Logic gate class 12
Logic gate class 12
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic logic gates
 
CBSE XII Boolean Algebra
CBSE XII Boolean AlgebraCBSE XII Boolean Algebra
CBSE XII Boolean Algebra
 
ROM(Read Only Memory )
ROM(Read Only Memory )ROM(Read Only Memory )
ROM(Read Only Memory )
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
 

Similar to Logic gates

chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxRithinA1
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxWilliamJosephat1
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptxAravindaAKumar1
 
Components logic gates
Components   logic gatesComponents   logic gates
Components logic gatessld1950
 
BOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.pptBOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.pptdhanamalathieee
 
Digital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptxDigital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptxProfVilasShamraoPati
 
digita circuit design.pptx
digita circuit design.pptxdigita circuit design.pptx
digita circuit design.pptxGodwin585235
 
Introduction to digital logic gates
Introduction to digital logic gatesIntroduction to digital logic gates
Introduction to digital logic gatesVikas Dongre
 
digital electronics .pptx
digital electronics .pptxdigital electronics .pptx
digital electronics .pptxAjaykumar967485
 

Similar to Logic gates (20)

2 gates
2 gates2 gates
2 gates
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Digital logic
Digital logicDigital logic
Digital logic
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
 
class xi pptx-1.pptx
class xi pptx-1.pptxclass xi pptx-1.pptx
class xi pptx-1.pptx
 
9. logic gates._rr
9. logic gates._rr9. logic gates._rr
9. logic gates._rr
 
Logic gates (1)
Logic gates (1)Logic gates (1)
Logic gates (1)
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptx
 
Class 12th Logic Gates
Class 12th Logic GatesClass 12th Logic Gates
Class 12th Logic Gates
 
Components logic gates
Components   logic gatesComponents   logic gates
Components logic gates
 
Lecturer mid.ppt
Lecturer mid.pptLecturer mid.ppt
Lecturer mid.ppt
 
Logic Gates (1).ppt
Logic Gates (1).pptLogic Gates (1).ppt
Logic Gates (1).ppt
 
BOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.pptBOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.ppt
 
Digital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptxDigital Electronics-Review of Logic Gates.pptx
Digital Electronics-Review of Logic Gates.pptx
 
digita circuit design.pptx
digita circuit design.pptxdigita circuit design.pptx
digita circuit design.pptx
 
Introduction to digital logic gates
Introduction to digital logic gatesIntroduction to digital logic gates
Introduction to digital logic gates
 
Logic circuit2017
Logic circuit2017Logic circuit2017
Logic circuit2017
 
Boolean Algebra.pptx
 Boolean Algebra.pptx Boolean Algebra.pptx
Boolean Algebra.pptx
 
digital electronics .pptx
digital electronics .pptxdigital electronics .pptx
digital electronics .pptx
 

More from VerronBriscoe

More from VerronBriscoe (12)

Video confrencing
Video confrencingVideo confrencing
Video confrencing
 
Telemarketing2
Telemarketing2Telemarketing2
Telemarketing2
 
Telecommuting
TelecommutingTelecommuting
Telecommuting
 
Outline trends in tech (part1)
Outline   trends in tech (part1)Outline   trends in tech (part1)
Outline trends in tech (part1)
 
New robotics
New roboticsNew robotics
New robotics
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Expert system
Expert systemExpert system
Expert system
 
Current trends in technology
Current trends in technologyCurrent trends in technology
Current trends in technology
 
Current trends in technology 7
Current trends in technology 7Current trends in technology 7
Current trends in technology 7
 
Computers in banking
Computers in bankingComputers in banking
Computers in banking
 
Biometrics
BiometricsBiometrics
Biometrics
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 

Logic gates

  • 1. Computer Science 101 Logic Gates and Simple Circuits
  • 2. Transistor - Electronic Switch  Collector   Base Switch Emitter   Base High (+5v or 1) Makes connection Base Low (0v or 0) Disconnects Say, 500 million transistors on a chip 1 cm2 Change states in billionth of sec Solid state
  • 3. Moore’s Law In 1965, Intel co-founder Gordon Moore saw the future. His prediction, now popularly known as Moore's Law, states that the number of transistors on a chip doubles about every two years.
  • 4. Gates  A gate is an electronic device that takes 0/1 inputs and produces a 0/1 result.
  • 5. NOT Gate  Output Input  Input Low (0v or 0) Output High (+5v or 1)  +5v Input High (+5v or 1) Output Low (0v or 0) Output is opposite of Input NOT Gate Ground A _ A
  • 6. AND Gate  Output is 1 only if • Input-1 is 1 and • Input-2 is 1  +5v Output = Input1 AND Input2 Input-1 AND Gate A Input-2 B Output AB
  • 7. OR Gate  • A is 1 or if • B is 1 +5v  A Output is 1 if Output = A OR B B OR Gate A Output B A+B
  • 8. Boolean Expression  Python Logical operators • AND • OR • NOT and (Python) or (Python) not (Python)  NOT ((x>y) AND ((x=5) OR (y=3))  not((x>y) and ((x==5)or(y==3)))  while (not((x>y) and ((x==5)or(y==3)))) : …
  • 9. Abstraction  In computer science, the term abstraction refers to the practice of defining and using objects or systems based on the high level functions they provide.  We suppress the fine details of how these functions are carried out or implemented.  In this way, we are able to focus on the big picture.  If the implementation changes, our high level work is not affected.
  • 10. Abstraction Examples  Boolean algebra - we can work with the Boolean expressions knowing only the properties or laws - we do not need to know the details of what the variables represent.  Gates - we can work with the logic gates knowing only their function (output is 1 only if inputs are …). Don’t have to know how gate is constructed from transistors.
  • 11. Boolean Exp  Logic Circuit To draw a circuit from a Boolean expression: • From the left, make an input line for each variable. • Next, put a NOT gate in for each variable that appears negated in the expression. • Still working from left to right, build up circuits for the subexpressions, from simple to complex.
  • 12. Logic Circuit: _ ____ AB+(A+B)B Input Lines for Variables A B
  • 13. Logic Circuit: _ ____ AB+(A+B)B NOT Gate for B A B _ B
  • 14. Logic Circuit: _ ____ AB+(A+B)B _ Subexpression AB _ AB A B _ B
  • 15. Logic Circuit: _ ____ AB+(A+B)B Subexpression A+B _ AB A A+B B _ B
  • 16. Logic Circuit: _ ____ AB+(A+B)B ___ Subexpression A+B _ AB A A+B B _ B ____ A+B
  • 17. Logic Circuit: _ ____ AB+(A+B)B ___ Subexpression (A+B)B _ AB A A+B B _ B ____ A+B ____ (A+B)B
  • 18. Logic Circuit: _ ____ AB+(A+B)B Entire Expression _ AB A A+B B _ B ____ A+B ____ (A+B)B
  • 19. Logic Circuit Boolean Exp  In the opposite direction, given a logic circuit, we can write a Boolean expression for the circuit.  First we label each input line as a variable.  Then we move from the inputs labeling the outputs from the gates.  As soon as the input lines to a gate are labeled, we can label the output line.  The label on the circuit output is the result.
  • 20. Logic Circuit Boolean Exp _ _ _ AB AB+AB A _ A B _ B _ AB A+B Entire Expression ______ _ _ (AB+AB)(A+B) ______ _ _ AB+AB
  • 21. Simplification Revisited  Once we have the BE for the circuit, perhaps we can simplify. AB AB A B A B AB A B A B A B A A B A BB A B A AA AB BA B