SlideShare a Scribd company logo
Computer logic and gates
COMPUTER LOGIC AND
GATES
Presenter: SAMINA KHAN
Fazaia Degree College Risalpur
DATA REPRESENTATION IN
COMPUTER
• Computer is an electronic machine
• It consists of millions of electronic
switches .
• If electronic switch is closed
electricity flows
• If electronic switch is open electricity
does not flows
DATA REPRESENTATION IN COMPUTER
• Switch has two states.
• when electronic switch is closed electricity
flows it is called 1 .
• when electronic switch is open electricity does
not flows it is called 0 .
• Therefore 0 and 1 are used in computer to
represent the two states of switch
Computer logic and gates
How do computer represent data?
• Look at your keyboard
• It has many keys such as alphabet keys, number
keys and special keys.
• Whenever we type something using these keys,
computer represent that data in 1s and 0s
pattern.
Computer logic and gates
How do computer represent data?
• These 1s and 0s are called bits.
• Bit is the abbreviation of binary digit.
• Humans understand words and pictures,
computer understand the binary pattern.
How the computer understand
the pattern of 1s and 0s?
• Computer detects the flow of current.
• 1 represents that the current flow in circuit
• 0 represent that the current is not flowing.
Computer logic and gates
DIGITAL LOGIC & LOGIC
GATES
DIGITAL LOGIC
• It is fundamental in creating electronic devices
such as calculator, computer, digital watches
etc
• DIGITAL logic is used to create digital circuits
which consists of large number of logic gates
LOGIC GATES
• Logic gates are building blocks of digital
circuits used in computer and many other
devices .
• They have two or more inputs (high or low)
and produce a single output (high or low).
TRUTH TABLE
• The truth table represents a digital logic circuit
in table form.
• It shows how a logic circuit’s output responds
to all the possible combinations of the inputs
using logic “1” for True and logic “0” for False.
BASIC LOGIC GATES
• There are three basic logic gates:
• AND GATE
• OR GATE
• NOT GATE
AND GATE
• The AND gate has two or more inputs that can
be low (0) or high (1).
• The output is high when all the inputs are high.
• It produces low output only when at least one
of the inputs are low .
TRUTH TABLE FOR AND GATE
• The truth table for AND gate for two variables.
Computer logic and gates
OR GATE
• An OR gate is a logic gate that performs logical
OR operation.
• A logical OR operation has a high output (1) if
one or both the inputs to the gate are high (1).
• If neither input is high, a low output (0)
results.
TRUTH TABLE FOR OR GATE
• The truth table of a 2 input OR gate can be
represented as:
Computer logic and gates
NOT GATE
• Logic NOT gates provide the complement of
their input signal.
• When their input signal is “HIGH” their
output state will NOT be “HIGH”.
• When their input signal is “LOW” their output
state will NOT be “LOW”.
TRUTH TABLE FOR NOT GATE
• The truth table for NOT gate .
• The “bubble” (o) present at the end of
the NOT gate symbol above denotes a signal
inversion (complementation) of the output
signal.
1 0
0 1
Computer logic and gates
NAND GATE
• The NAND gate is a combination of an
AND gate and NOT gate.
• It produces low output only when all inputs
are high .
TRUTH TABLE FOR NAND GATE
• The truth table for NAND gate for two
variables.
X Y AND
(A.B)
NAND
(A.B)
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
Computer logic and gates
NOR GATE
• The NOR gate combines the OR gate and NOT
gate.
• It is the result of the negation of the OR
operator.
• It produces low output only when any input is
high .
• A HIGH output (1) results if both the inputs to
the gate are LOW (0).
TRUTH TABLE FOR NOR GATE
• The truth table for NOR gate for two variables.
• The bubble indicates that the function of the
or gate has been inverted.
Computer logic and gates
Computer logic and gates
CREATING NAND AND NOR GATE
USING BASIC GATES
Creating NAND gate using AND
and NOT gates
• The NAND gate can be easily created by using
an AND gate and NOT gate.
• It is also called Negated And gate.
Creating NOR gate using OR and
NOT gates
• The NOR gate can be created by using OR and
NOT gate.
Exclusive OR GATE(XOR gate)
• An XOR gate implements an exclusive or; that
is, a true output results if one, and only one,
of the inputs to the gate is true. If both inputs
are false or both are true, a false output
results.
Exclusive OR GATE(XOR gate)
• It is a type of logic gate use to perform a
Boolean expression: F= X.Y+X.Y
• To perform this Boolean function we need
three different logic gates.
oNOT gate (to find NOT of X & Y)
oAND gate (to find X.Y & X.Y)
oOR gate ( to perform addition operation
X.Y+X.Y
TRUTH TABLE FOR Exclusive OR
GATE(XOR gate)
X Y
0 0
0 1
1 0
1 1
X Y
1 1
1 0
0 1
0 0
XY
0
1
0
0
XY
0
0
1
0
F= X.Y+X.Y
F
0
1
1
0
SYMBOL FOR Exclusive OR
GATE(XOR gate)
HOW Exclusive OR GATE WORK?
Exclusive NOR GATE(XNOR gate)
• The XNOR gate is the complement of the XOR
gate
TRUTH TABLE FOR Exclusive NOR
GATE(XNOR gate)
X Y
0 0
0 1
1 0
1 1
F= X.Y+X.Y
XNOR
1
0
0
1
XOR
0
1
1
0
SYMBOL FOR Exclusive NOR
GATE(XNOR gate)
References
• https://www.electronics-tutorials.ws/logic/logic_4.html
• https://www.vivaxsolutions.com/physics/allogicgates.aspx
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm
• https://techterms.com/definition/logicgate
• https://whatis.techtarget.com/definition/logic-gate-AND-OR-XOR-NOT-NAND-NOR-and-
XNOR
Computer logic and gates

More Related Content

PPT
basic logic gates
PPTX
Electronics: Logic Gates
PPTX
ICT Basic Logic Gates Lessons.pptx
PPT
Logic gates presentation
PDF
Lec 04 - Gate-level Minimization
PPT
Digital logic gates and Boolean algebra
PPTX
Logical and Conditional Operator In C language
basic logic gates
Electronics: Logic Gates
ICT Basic Logic Gates Lessons.pptx
Logic gates presentation
Lec 04 - Gate-level Minimization
Digital logic gates and Boolean algebra
Logical and Conditional Operator In C language

What's hot (20)

PDF
introduction to computers
PPTX
Chapter 6 algorithms and flow charts
PPT
Logic gates
PPS
Cache memory
PDF
Analysis sequential circuits
PPTX
Combinational Circuits & Sequential Circuits
PPT
PPT
Chapter 2 Representation Of Algorithms 2
PPTX
Presentation On Logic Gate
PPTX
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
PPTX
Number system in Digital Electronics
PPT
Digital Logic circuit
PPT
13 Boolean Algebra
PPTX
Loops c++
PPT
Boolean algebra
PPTX
Latches and flip flops
PPT
Combinational circuits
PPTX
sequential circuits
PPTX
Instruction cycle presentation
introduction to computers
Chapter 6 algorithms and flow charts
Logic gates
Cache memory
Analysis sequential circuits
Combinational Circuits & Sequential Circuits
Chapter 2 Representation Of Algorithms 2
Presentation On Logic Gate
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Number system in Digital Electronics
Digital Logic circuit
13 Boolean Algebra
Loops c++
Boolean algebra
Latches and flip flops
Combinational circuits
sequential circuits
Instruction cycle presentation
Ad

Similar to Computer logic and gates (20)

PPTX
investagatory PHYSICS-LOGIC GATES
PPTX
Lecture 04-Digital logic gates.pptx
PPTX
Digital logic
PPTX
digital electronics .pptx
PPTX
Logic gates 07 11-2014
PPT
LOGIC GATES
PPTX
PPTX
DOC-20240203-WA0000.pptx
PPTX
Logic Gate.pptx
PDF
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
PPTX
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
PDF
logic gates
PDF
Basic Logic Gates with Truth Tables.pdf
PDF
Logic Gates.pdf A short evaluation and description of logic gates
PPTX
Logic gates
PDF
LOGICAL_GATES_priyansh_singhal.pdf
PPT
boolean algrebra and logic gates in short
PDF
BASIC LOGIC GATES.pdf
PPTX
Physics_Investigatory_Project_on_Logic_G.pptx
PDF
Logic gates
investagatory PHYSICS-LOGIC GATES
Lecture 04-Digital logic gates.pptx
Digital logic
digital electronics .pptx
Logic gates 07 11-2014
LOGIC GATES
DOC-20240203-WA0000.pptx
Logic Gate.pptx
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
logic gates
Basic Logic Gates with Truth Tables.pdf
Logic Gates.pdf A short evaluation and description of logic gates
Logic gates
LOGICAL_GATES_priyansh_singhal.pdf
boolean algrebra and logic gates in short
BASIC LOGIC GATES.pdf
Physics_Investigatory_Project_on_Logic_G.pptx
Logic gates
Ad

More from samina khan (20)

PPTX
TYPES AND HIERARCHY OF COMPUTER MEMORY.pptx
PPTX
DATA COMMUNICATION components, modes of transmission & communication devices ...
PPTX
UNDERSTANDING SELF AND OTHERS.pptx
PPTX
INFORMATION TECHNOLOGY.pptx
PPTX
scaffolding in teaching.pptx
PPTX
REFLECTIVE TEACHING.pptx
PPTX
PEDAGOGICAL SKILLS.pptx
PPTX
What is an Autobiography?
PPTX
Picture description
PPTX
The Internet and World Wide Web
PPTX
Computer security & ethics
PPTX
Problem solving
PPTX
Computer networks
PPT
Classroom management
PPTX
More on number system
PPTX
Stress management
PPT
Classroom management
PPTX
The future of technology
DOCX
Lesson plan:Multiplication and division of binary numbers
PPTX
Computer networks grade 7
TYPES AND HIERARCHY OF COMPUTER MEMORY.pptx
DATA COMMUNICATION components, modes of transmission & communication devices ...
UNDERSTANDING SELF AND OTHERS.pptx
INFORMATION TECHNOLOGY.pptx
scaffolding in teaching.pptx
REFLECTIVE TEACHING.pptx
PEDAGOGICAL SKILLS.pptx
What is an Autobiography?
Picture description
The Internet and World Wide Web
Computer security & ethics
Problem solving
Computer networks
Classroom management
More on number system
Stress management
Classroom management
The future of technology
Lesson plan:Multiplication and division of binary numbers
Computer networks grade 7

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Machine Learning_overview_presentation.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
1. Introduction to Computer Programming.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
A Presentation on Artificial Intelligence
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
Group 1 Presentation -Planning and Decision Making .pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Machine Learning_overview_presentation.pptx
Getting Started with Data Integration: FME Form 101
Unlocking AI with Model Context Protocol (MCP)
Dropbox Q2 2025 Financial Results & Investor Presentation
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
1. Introduction to Computer Programming.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
MIND Revenue Release Quarter 2 2025 Press Release
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
Spectroscopy.pptx food analysis technology
NewMind AI Weekly Chronicles - August'25-Week II
A Presentation on Artificial Intelligence

Computer logic and gates

  • 2. COMPUTER LOGIC AND GATES Presenter: SAMINA KHAN Fazaia Degree College Risalpur
  • 3. DATA REPRESENTATION IN COMPUTER • Computer is an electronic machine • It consists of millions of electronic switches . • If electronic switch is closed electricity flows • If electronic switch is open electricity does not flows
  • 4. DATA REPRESENTATION IN COMPUTER • Switch has two states. • when electronic switch is closed electricity flows it is called 1 . • when electronic switch is open electricity does not flows it is called 0 . • Therefore 0 and 1 are used in computer to represent the two states of switch
  • 6. How do computer represent data? • Look at your keyboard • It has many keys such as alphabet keys, number keys and special keys. • Whenever we type something using these keys, computer represent that data in 1s and 0s pattern.
  • 8. How do computer represent data? • These 1s and 0s are called bits. • Bit is the abbreviation of binary digit. • Humans understand words and pictures, computer understand the binary pattern.
  • 9. How the computer understand the pattern of 1s and 0s?
  • 10. • Computer detects the flow of current. • 1 represents that the current flow in circuit • 0 represent that the current is not flowing.
  • 12. DIGITAL LOGIC & LOGIC GATES
  • 13. DIGITAL LOGIC • It is fundamental in creating electronic devices such as calculator, computer, digital watches etc • DIGITAL logic is used to create digital circuits which consists of large number of logic gates
  • 14. LOGIC GATES • Logic gates are building blocks of digital circuits used in computer and many other devices . • They have two or more inputs (high or low) and produce a single output (high or low).
  • 15. TRUTH TABLE • The truth table represents a digital logic circuit in table form. • It shows how a logic circuit’s output responds to all the possible combinations of the inputs using logic “1” for True and logic “0” for False.
  • 16. BASIC LOGIC GATES • There are three basic logic gates: • AND GATE • OR GATE • NOT GATE
  • 17. AND GATE • The AND gate has two or more inputs that can be low (0) or high (1). • The output is high when all the inputs are high. • It produces low output only when at least one of the inputs are low .
  • 18. TRUTH TABLE FOR AND GATE • The truth table for AND gate for two variables.
  • 20. OR GATE • An OR gate is a logic gate that performs logical OR operation. • A logical OR operation has a high output (1) if one or both the inputs to the gate are high (1). • If neither input is high, a low output (0) results.
  • 21. TRUTH TABLE FOR OR GATE • The truth table of a 2 input OR gate can be represented as:
  • 23. NOT GATE • Logic NOT gates provide the complement of their input signal. • When their input signal is “HIGH” their output state will NOT be “HIGH”. • When their input signal is “LOW” their output state will NOT be “LOW”.
  • 24. TRUTH TABLE FOR NOT GATE • The truth table for NOT gate . • The “bubble” (o) present at the end of the NOT gate symbol above denotes a signal inversion (complementation) of the output signal. 1 0 0 1
  • 26. NAND GATE • The NAND gate is a combination of an AND gate and NOT gate. • It produces low output only when all inputs are high .
  • 27. TRUTH TABLE FOR NAND GATE • The truth table for NAND gate for two variables. X Y AND (A.B) NAND (A.B) 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0
  • 29. NOR GATE • The NOR gate combines the OR gate and NOT gate. • It is the result of the negation of the OR operator. • It produces low output only when any input is high . • A HIGH output (1) results if both the inputs to the gate are LOW (0).
  • 30. TRUTH TABLE FOR NOR GATE • The truth table for NOR gate for two variables. • The bubble indicates that the function of the or gate has been inverted.
  • 33. CREATING NAND AND NOR GATE USING BASIC GATES
  • 34. Creating NAND gate using AND and NOT gates • The NAND gate can be easily created by using an AND gate and NOT gate. • It is also called Negated And gate.
  • 35. Creating NOR gate using OR and NOT gates • The NOR gate can be created by using OR and NOT gate.
  • 36. Exclusive OR GATE(XOR gate) • An XOR gate implements an exclusive or; that is, a true output results if one, and only one, of the inputs to the gate is true. If both inputs are false or both are true, a false output results.
  • 37. Exclusive OR GATE(XOR gate) • It is a type of logic gate use to perform a Boolean expression: F= X.Y+X.Y • To perform this Boolean function we need three different logic gates. oNOT gate (to find NOT of X & Y) oAND gate (to find X.Y & X.Y) oOR gate ( to perform addition operation X.Y+X.Y
  • 38. TRUTH TABLE FOR Exclusive OR GATE(XOR gate) X Y 0 0 0 1 1 0 1 1 X Y 1 1 1 0 0 1 0 0 XY 0 1 0 0 XY 0 0 1 0 F= X.Y+X.Y F 0 1 1 0
  • 39. SYMBOL FOR Exclusive OR GATE(XOR gate)
  • 40. HOW Exclusive OR GATE WORK?
  • 41. Exclusive NOR GATE(XNOR gate) • The XNOR gate is the complement of the XOR gate
  • 42. TRUTH TABLE FOR Exclusive NOR GATE(XNOR gate) X Y 0 0 0 1 1 0 1 1 F= X.Y+X.Y XNOR 1 0 0 1 XOR 0 1 1 0
  • 43. SYMBOL FOR Exclusive NOR GATE(XNOR gate)
  • 44. References • https://www.electronics-tutorials.ws/logic/logic_4.html • https://www.vivaxsolutions.com/physics/allogicgates.aspx • https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm • https://techterms.com/definition/logicgate • https://whatis.techtarget.com/definition/logic-gate-AND-OR-XOR-NOT-NAND-NOR-and- XNOR