SlideShare uma empresa Scribd logo
1 de 23
CSC-103 1
Outcome of this chapter
 Knowledge about logic gates, their expression, input
and output.
 Know how to draw circuits for Boolean expression.
 Know how to express a circuit through Boolean
expression.
2
CSC-103
Boolean Algebra
 Boolean algebra is the mathematics of Boolean logic,
where statements are evaluated to be either true or
false.
 It is extremely important in computer sciences, such
as programming, database querying and computer
engineering, as electrical signals at the most basic
level are translated to and from binary (true/false,
1/0, on/off, closed/open, etc).
3
CSC-103
Logic Gate
 A logic gate is an elementary building block of a digital
circuit.
 A Logic Gate in an electronic sense makes a ‘logical’
decision based upon a set of rules, and if the
appropriate conditions are met then the gate is
opened, and an output signal is produced.
 Most logic gates have two inputs and one output.
 At any given moment, every terminal is in one of the
two binary conditions low (0) or high (1), represented
by different voltage levels.
4
CSC-103
Truth Table
 A truth table shows how a
logic circuit's output responds
to various combinations of
the inputs, using logic 1 for
true and logic 0 for false.
 All permutations of the
inputs are listed on the left,
and the output of the circuit
is listed on the right.
 The desired output can be
achieved by a combination of
logic gates.
Inputs Output
B
A
Q
0
0
0
0
1
0
1
0
0
1
1
1
5
CSC-103
Logic Gates
Fundamental Logic Gates:
 AND gate
 OR gate
 NOT gate
Universal Logic Gates:
 NAND gate
 NOR gate
Special Logic Gates:
 XNOR gate
 XOR gate
6
CSC-103
The AND gate
2 input AND gate:
7
A
B
Q
Inputs Output
B A Q
0 0 0
0 1 0
1 0 0
1 1 1
The truth table for the 2
input AND gate
Symbol for a 2 input
AND gate
Q=A.B
Boolean expression for a 2
input AND gate
3 input AND gate:
A
B
Q
C
Inputs Output
C B A Q
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Symbol for a 3 input
AND gate
The truth table for the 3
input AND gate
Q=A.B.C
Boolean expression for a 3
input AND gate
CSC-103
The OR gate
2 input OR gate:
8
Inputs Output
B A Q
0 0 0
0 1 1
1 0 1
1 1 1
The truth table for the 2
input OR gate
Symbol for a 2 input
OR gate
Q = A + B
Boolean expression for a 2
input OR gate
3 input OR gate:
Inputs Output
C B A Q
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Symbol for a 3 input
OR gate
The truth table for the 3
input OR gate
Q = A + B + C
Boolean expression for a 3
input OR gate
CSC-103
The NOT gate
Symbol for a NOT gate :
9
The truth table for the 2
input OR gate
Truth Table for NOT gate
A = A’
Boolean expression for NOT
gate
Input Output
A Q
0 1
1 0
This is the simplest form of logic
gate and has only 1 input and 1
output.
CSC-103
The NAND gate
2 input NAND gate:
10
Inputs Output
B A Q
0 0 1
0 1 1
1 0 1
1 1 0
The truth table for the 2
input NAND gate
Symbol for a 2 input
NAND gate
Q = A . B
Boolean expression for a 2
input NAND gate
3 input NAND gate:
Inputs Output
C B A Q
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
Symbol for a 3 input
NAND gate
The truth table for the 3
input NAND gate
Q = A . B . C
Boolean expression for a 3
input NAND gate
A
B
Q Q
A
B
C
CSC-103
The NOR gate
2 input NOR gate:
11
Inputs Output
B A Q
0 0 1
0 1 0
1 0 0
1 1 0
The truth table for the 2
input NOR gate
Symbol for a 2 input
NOR gate
Q = A + B
Boolean expression for a 2
input NOR gate
3 input NOR gate:
Inputs Output
C B A Q
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
Symbol for a 3 input
NOR gate
The truth table for the 3
input NOR gate
Q = A + B + C
Boolean expression for a 3
input NOR gate
A
B
Q
Q
A
B
C
CSC-103
The XOR gate
2 input XOR gate:
12
Inputs Output
B A Q
0 0 0
0 1 1
1 0 1
1 1 0
The truth table for the 2
input XOR gate
Symbol for a 2 input
XOR gate
Boolean expression for a 2
input XOR gate
A
B
Q
B
A
B
A
Q
or
B
A
Q
.
. 



CSC-103
The XNOR gate
2 input XNOR gate:
13
Inputs Output
B A Q
0 0 1
0 1 0
1 0 0
1 1 1
The truth table for the 2
input XNOR gate
Symbol for a 2 input
XNOR gate
Boolean expression for a 2
input XNOR gate
A
B
Q
B
A
B
A
Q
or
B
A
Q
.
. 



CSC-103
Universal Logic Gates
 NAND and NOR gates are referred to as universal gates as
the three basic gates can be constructed using either one of
the two.
 This therefore implies that all logic circuits can be
constructed using either of the gates.
 NAND and NOR gates are economical and easier to
implement.
14
CSC-103
Implementation of other gates using
Universal Logic Gates
15
Basic Gates Using NOR Gate Basic Gates Using NAND Gate
CSC-103
Exercise - 1.1
1. Look at the following logic symbols labeled A – G.
16
i. Which is the correct symbol for an AND gate. ……………
ii. Which is the correct symbol for a NOT gate. ……………
iii.Which is the correct symbol for a NOR gate. ……………
iv.Which is the correct symbol for an EXOR gate. ……………
v. Which is the correct symbol for a NAND gate. ……………
vi.Which is the correct symbol for an XNOR gate. ……………
vii.Which is the correct symbol for an OR gate. ……………
CSC-103
Exercise - 1.1 (Cont…)
2. Complete the following truth tables.
17
i. AND gate.
Inputs Output
B A Q
0 0
0 1
1 0
1 1
ii. NOR gate.
Inputs Output
B A Q
0 0
0 1
1 0
1 1
iii. XNOR gate.
Inputs Output
B A Q
0 0
0 1
1 0
1 1
iv. NAND gate.
Inputs Output
B A Q
0 0
0 1
1 0
1 1
v. OR gate.
Inputs Output
B A Q
0 0
0 1
1 0
1 1
CSC-103
Exercise - 1.1 (Cont…)
3. The Boolean equations labeled 1 – 9, below are to be used to answer the
following questions.
18
B
A
Q .

B
A
Q 

B
A
Q 

B
A
B
A
Q .
. 

B
A
Q 

B
A
B
A
Q .
. 

A
Q 
B
A
Q .

B
A
Q 

1.
2.
3.
4.
5.
6.
7.
8.
9.
i. Which expression is correct for an AND gate.……………
ii. Which expression is correct for a NOT gate.……………
iii. Which expression is correct for a NOR gate.……………
iv. Which two expressions are correct for an EXOR gate.……… & ………
v. Which expression is correct for a NAND gate.……………
vi. Which two expressions are correct for an XNOR gate.……… & ………
vii. Which expression is correct for an OR gate.……………
CSC-103
Equation to Circuit
To convert a Boolean expression to a gate circuit, evaluate
the expression using standard order of operations:
1. To solve the equation start from the left to right
2. Parentheses
3. Inverse (Not Gate)
4. Multiplication (AND Gate)
5. Addition (OR Gate)
19
CSC-103
Circuit to Equation
To convert a gate circuit to a Boolean expression, label each
gate output with a Boolean sub-expression corresponding
to the gates' input signals, until a final expression is
reached at the last gate.
20
The Expression for above circuit is XʹY+XYʹ.
CSC-103
Class Practice
1. Draw the circuit diagram for the equation
i. AB + (AC)ʹ.
ii. (A+B) . (B+C)
iii. (A+B+C) . B . C
2. Write down the corresponding Boolean expression for
following circuit.
21
CSC-103
Exercise – 1.2
1. Draw the corresponding circuit and truth table for
following Boolean expression
XYZ(YZ’+ZY’)
2. Draw a logic circuit and truth table for (A + B)C.
3. Find the Boolean expression and truth table for
following circuit.
22
CSC-103
Thank You
23
CSC-103

Mais conteúdo relacionado

Semelhante a Chapter 5 Basic Gates and Boolean Logic.pptx

FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic Gates
FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic GatesFYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic Gates
FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic GatesArti Parab Academics
 
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...VLSICS Design
 
A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...
A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...
A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...VLSICS Design
 
Digital electronics lab
Digital electronics labDigital electronics lab
Digital electronics labswatymanoja
 
Hardware combinational
Hardware combinationalHardware combinational
Hardware combinationalDefri Tan
 
Reversible logic gate
Reversible logic gateReversible logic gate
Reversible logic gateDebraj Maji
 
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdfDamotTesfaye
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1Techglyphs
 
An Efficient Design for Data Encryption and Decryption using Reconfigurable R...
An Efficient Design for Data Encryption and Decryption using Reconfigurable R...An Efficient Design for Data Encryption and Decryption using Reconfigurable R...
An Efficient Design for Data Encryption and Decryption using Reconfigurable R...IRJET Journal
 
Logic gatesrevised.ppt
Logic gatesrevised.pptLogic gatesrevised.ppt
Logic gatesrevised.pptDevanDev7
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxWilliamJosephat1
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manualNitesh Dubey
 
A review on reversible logic gates and their implementation
A review on reversible logic gates and their implementationA review on reversible logic gates and their implementation
A review on reversible logic gates and their implementationDebraj Maji
 

Semelhante a Chapter 5 Basic Gates and Boolean Logic.pptx (20)

FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic Gates
FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic GatesFYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic Gates
FYBSC IT Digital Electronics Unit II Chapter I Boolean Algebra and Logic Gates
 
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
A NEW DESIGN TECHNIQUE OF REVERSIBLE BCD ADDER BASED ON NMOS WITH PASS TRANSI...
 
A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...
A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...
A New Design Technique of Reversible BCD Adder Based on NMOS with Pass Transi...
 
STLD-Combinational logic design
STLD-Combinational  logic design STLD-Combinational  logic design
STLD-Combinational logic design
 
Digital electronics lab
Digital electronics labDigital electronics lab
Digital electronics lab
 
Hardware combinational
Hardware combinationalHardware combinational
Hardware combinational
 
Reversible logic gate
Reversible logic gateReversible logic gate
Reversible logic gate
 
12.Digital Logic.pdf
12.Digital Logic.pdf12.Digital Logic.pdf
12.Digital Logic.pdf
 
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
4,encoder & decoder MUX and DEMUX EEng - Copy.pdf
 
Bt0064 logic design1
Bt0064 logic design1Bt0064 logic design1
Bt0064 logic design1
 
ECAD lab manual
ECAD lab manualECAD lab manual
ECAD lab manual
 
An Efficient Design for Data Encryption and Decryption using Reconfigurable R...
An Efficient Design for Data Encryption and Decryption using Reconfigurable R...An Efficient Design for Data Encryption and Decryption using Reconfigurable R...
An Efficient Design for Data Encryption and Decryption using Reconfigurable R...
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Logic gatesrevised.ppt
Logic gatesrevised.pptLogic gatesrevised.ppt
Logic gatesrevised.ppt
 
2th year iv sem de lab manual
2th year iv sem de lab manual2th year iv sem de lab manual
2th year iv sem de lab manual
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Computer Organization And Architecture lab manual
Computer Organization And Architecture lab manualComputer Organization And Architecture lab manual
Computer Organization And Architecture lab manual
 
A review on reversible logic gates and their implementation
A review on reversible logic gates and their implementationA review on reversible logic gates and their implementation
A review on reversible logic gates and their implementation
 
The decoder
The decoderThe decoder
The decoder
 

Mais de NiloyHasan12

Chapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptxChapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptxNiloyHasan12
 
Chapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdfChapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdfNiloyHasan12
 
Chapter 7 Basic Data Storage.pptx
Chapter 7 Basic Data Storage.pptxChapter 7 Basic Data Storage.pptx
Chapter 7 Basic Data Storage.pptxNiloyHasan12
 
Chapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptxChapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptxNiloyHasan12
 
Basic Software.pptx
 Basic Software.pptx Basic Software.pptx
Basic Software.pptxNiloyHasan12
 
Chapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptxChapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptxNiloyHasan12
 

Mais de NiloyHasan12 (6)

Chapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptxChapter 8 Basic concept of e-commerce.pptx
Chapter 8 Basic concept of e-commerce.pptx
 
Chapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdfChapter 10 Basic Networking.pdf
Chapter 10 Basic Networking.pdf
 
Chapter 7 Basic Data Storage.pptx
Chapter 7 Basic Data Storage.pptxChapter 7 Basic Data Storage.pptx
Chapter 7 Basic Data Storage.pptx
 
Chapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptxChapter 2 Basic Hardware.pptx
Chapter 2 Basic Hardware.pptx
 
Basic Software.pptx
 Basic Software.pptx Basic Software.pptx
Basic Software.pptx
 
Chapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptxChapter 1 Computer Concepts.pptx
Chapter 1 Computer Concepts.pptx
 

Último

Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline 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
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 

Último (20)

Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
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
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 

Chapter 5 Basic Gates and Boolean Logic.pptx

  • 2. Outcome of this chapter  Knowledge about logic gates, their expression, input and output.  Know how to draw circuits for Boolean expression.  Know how to express a circuit through Boolean expression. 2 CSC-103
  • 3. Boolean Algebra  Boolean algebra is the mathematics of Boolean logic, where statements are evaluated to be either true or false.  It is extremely important in computer sciences, such as programming, database querying and computer engineering, as electrical signals at the most basic level are translated to and from binary (true/false, 1/0, on/off, closed/open, etc). 3 CSC-103
  • 4. Logic Gate  A logic gate is an elementary building block of a digital circuit.  A Logic Gate in an electronic sense makes a ‘logical’ decision based upon a set of rules, and if the appropriate conditions are met then the gate is opened, and an output signal is produced.  Most logic gates have two inputs and one output.  At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels. 4 CSC-103
  • 5. Truth Table  A truth table shows how a logic circuit's output responds to various combinations of the inputs, using logic 1 for true and logic 0 for false.  All permutations of the inputs are listed on the left, and the output of the circuit is listed on the right.  The desired output can be achieved by a combination of logic gates. Inputs Output B A Q 0 0 0 0 1 0 1 0 0 1 1 1 5 CSC-103
  • 6. Logic Gates Fundamental Logic Gates:  AND gate  OR gate  NOT gate Universal Logic Gates:  NAND gate  NOR gate Special Logic Gates:  XNOR gate  XOR gate 6 CSC-103
  • 7. The AND gate 2 input AND gate: 7 A B Q Inputs Output B A Q 0 0 0 0 1 0 1 0 0 1 1 1 The truth table for the 2 input AND gate Symbol for a 2 input AND gate Q=A.B Boolean expression for a 2 input AND gate 3 input AND gate: A B Q C Inputs Output C B A Q 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 Symbol for a 3 input AND gate The truth table for the 3 input AND gate Q=A.B.C Boolean expression for a 3 input AND gate CSC-103
  • 8. The OR gate 2 input OR gate: 8 Inputs Output B A Q 0 0 0 0 1 1 1 0 1 1 1 1 The truth table for the 2 input OR gate Symbol for a 2 input OR gate Q = A + B Boolean expression for a 2 input OR gate 3 input OR gate: Inputs Output C B A Q 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 Symbol for a 3 input OR gate The truth table for the 3 input OR gate Q = A + B + C Boolean expression for a 3 input OR gate CSC-103
  • 9. The NOT gate Symbol for a NOT gate : 9 The truth table for the 2 input OR gate Truth Table for NOT gate A = A’ Boolean expression for NOT gate Input Output A Q 0 1 1 0 This is the simplest form of logic gate and has only 1 input and 1 output. CSC-103
  • 10. The NAND gate 2 input NAND gate: 10 Inputs Output B A Q 0 0 1 0 1 1 1 0 1 1 1 0 The truth table for the 2 input NAND gate Symbol for a 2 input NAND gate Q = A . B Boolean expression for a 2 input NAND gate 3 input NAND gate: Inputs Output C B A Q 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 Symbol for a 3 input NAND gate The truth table for the 3 input NAND gate Q = A . B . C Boolean expression for a 3 input NAND gate A B Q Q A B C CSC-103
  • 11. The NOR gate 2 input NOR gate: 11 Inputs Output B A Q 0 0 1 0 1 0 1 0 0 1 1 0 The truth table for the 2 input NOR gate Symbol for a 2 input NOR gate Q = A + B Boolean expression for a 2 input NOR gate 3 input NOR gate: Inputs Output C B A Q 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 Symbol for a 3 input NOR gate The truth table for the 3 input NOR gate Q = A + B + C Boolean expression for a 3 input NOR gate A B Q Q A B C CSC-103
  • 12. The XOR gate 2 input XOR gate: 12 Inputs Output B A Q 0 0 0 0 1 1 1 0 1 1 1 0 The truth table for the 2 input XOR gate Symbol for a 2 input XOR gate Boolean expression for a 2 input XOR gate A B Q B A B A Q or B A Q . .     CSC-103
  • 13. The XNOR gate 2 input XNOR gate: 13 Inputs Output B A Q 0 0 1 0 1 0 1 0 0 1 1 1 The truth table for the 2 input XNOR gate Symbol for a 2 input XNOR gate Boolean expression for a 2 input XNOR gate A B Q B A B A Q or B A Q . .     CSC-103
  • 14. Universal Logic Gates  NAND and NOR gates are referred to as universal gates as the three basic gates can be constructed using either one of the two.  This therefore implies that all logic circuits can be constructed using either of the gates.  NAND and NOR gates are economical and easier to implement. 14 CSC-103
  • 15. Implementation of other gates using Universal Logic Gates 15 Basic Gates Using NOR Gate Basic Gates Using NAND Gate CSC-103
  • 16. Exercise - 1.1 1. Look at the following logic symbols labeled A – G. 16 i. Which is the correct symbol for an AND gate. …………… ii. Which is the correct symbol for a NOT gate. …………… iii.Which is the correct symbol for a NOR gate. …………… iv.Which is the correct symbol for an EXOR gate. …………… v. Which is the correct symbol for a NAND gate. …………… vi.Which is the correct symbol for an XNOR gate. …………… vii.Which is the correct symbol for an OR gate. …………… CSC-103
  • 17. Exercise - 1.1 (Cont…) 2. Complete the following truth tables. 17 i. AND gate. Inputs Output B A Q 0 0 0 1 1 0 1 1 ii. NOR gate. Inputs Output B A Q 0 0 0 1 1 0 1 1 iii. XNOR gate. Inputs Output B A Q 0 0 0 1 1 0 1 1 iv. NAND gate. Inputs Output B A Q 0 0 0 1 1 0 1 1 v. OR gate. Inputs Output B A Q 0 0 0 1 1 0 1 1 CSC-103
  • 18. Exercise - 1.1 (Cont…) 3. The Boolean equations labeled 1 – 9, below are to be used to answer the following questions. 18 B A Q .  B A Q   B A Q   B A B A Q . .   B A Q   B A B A Q . .   A Q  B A Q .  B A Q   1. 2. 3. 4. 5. 6. 7. 8. 9. i. Which expression is correct for an AND gate.…………… ii. Which expression is correct for a NOT gate.…………… iii. Which expression is correct for a NOR gate.…………… iv. Which two expressions are correct for an EXOR gate.……… & ……… v. Which expression is correct for a NAND gate.…………… vi. Which two expressions are correct for an XNOR gate.……… & ……… vii. Which expression is correct for an OR gate.…………… CSC-103
  • 19. Equation to Circuit To convert a Boolean expression to a gate circuit, evaluate the expression using standard order of operations: 1. To solve the equation start from the left to right 2. Parentheses 3. Inverse (Not Gate) 4. Multiplication (AND Gate) 5. Addition (OR Gate) 19 CSC-103
  • 20. Circuit to Equation To convert a gate circuit to a Boolean expression, label each gate output with a Boolean sub-expression corresponding to the gates' input signals, until a final expression is reached at the last gate. 20 The Expression for above circuit is XʹY+XYʹ. CSC-103
  • 21. Class Practice 1. Draw the circuit diagram for the equation i. AB + (AC)ʹ. ii. (A+B) . (B+C) iii. (A+B+C) . B . C 2. Write down the corresponding Boolean expression for following circuit. 21 CSC-103
  • 22. Exercise – 1.2 1. Draw the corresponding circuit and truth table for following Boolean expression XYZ(YZ’+ZY’) 2. Draw a logic circuit and truth table for (A + B)C. 3. Find the Boolean expression and truth table for following circuit. 22 CSC-103