SlideShare a Scribd company logo
1 of 28
Lecture-1-3
Topics Covered
• Boolean Algebra,
Logic Gates
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 1
• Binary variables take on one of two values(0,1).
• Logical operators operate on binary values and binary variables.
• Basic logical operators are the logic functions AND, OR and NOT.
• Manipulation on binary information is done through logic circuits=Logic
Gates
– Logic gates implement logic functions.
– Gates are blocks of hardware that produce signals of 1
or 0 when input logic requirements are satisfied.
• The relationship between the input and output is based on a certain
logic, hence the term= Logic Gates
• Boolean Algebra: a useful mathematical system for specifying and
transforming logic functions.
– Boolean algebra as a foundation for designing and
analyzing digital systems!
BCA-III/CAO Dr. Ramandeep Kaur
• The three basic logical operations are:
– AND
– OR
– NOT
• AND is denoted by a dot (·) or a
concatenation.
• OR is denoted by a plus (+).
• NOT is denoted by an overbar ( ¯ ), a
single quote mark (') after, or (~) before
the variable.
BCA-III/CAO Dr.
Boolean Algebra and Logic Gates 3
• Examples:
is read “Y is equal to A AND B.”
is read “y is equal to A OR B.”
is read “Y is equal to NOT A.”
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 4
Here, Y is an output function, A & B are binary variables
Note: The statement:
1 + 1 = 2 (read “one plus one equals two”)
is not the same as
1 + 1 = 1 (read “1 or 1 equals 1”).
= B
A
Y ×
B
A
Y +
=
A
Y =
• Logic gates have special symbols:
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 5
OR gate
X
Y
Z = X + Y
X
Y
Z = X ·Y
AND gate
X Z = X
NOT gate or
inverter
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 6
OR Gate
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 7
AND Gate
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 8
NOT Gate
• Tabular representation of Input-output relationship of binary
variables for each gate is = Truth Table
• Example: Truth tables for the basic logic operations, where
Z is the output function, with x,y as input variables:
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 9
0
1
1
0
X
NOT
X
Z=
1
1
1
0
0
1
0
1
0
0
0
0
Z = X·Y
Y
X
AND OR
X Y Z = X+Y
0 0 0
0 1 1
1 0 1
1 1 1
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 10
• Boolean equations, truth tables and logic diagrams describe the
same function!
• Truth tables are unique, but expressions and logic diagrams are
not. This gives flexibility in implementing functions.
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 11
X
Y F
Z
Logic Diagram
Logic Equation
Z
Y
X
F +
=
Truth Table
1
1 1 1
1
1 1 0
1
1 0 1
1
1 0 0
0
0 1 1
0
0 1 0
1
0 0 1
0
0 0 0
X Y Z Z
Y
X
F ×
+
=
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 12
•Obtain the Truth Table of the above function
•Draw the logic diagram using Boolean expression
NAND (NOT - AND ) is the complement of
the AND operation.
13
Computer Organization MCA 107 by Ruby Dahiya
NOR (NOT - OR) is the complement of the
OR operation.
14
Computer Organization MCA 107 by Ruby Dahiya
• Writing XOR using and/or/not
• x  y = x y+x y
BCA-III/CAO Dr. Ramandeep Kaur
15
x y xy
1 1 0
1 0 1
0 1 1
0 0 0
_
_
• eXclusive OR) A Boolean logic operation that
is widely used in cryptography as well as in
generating parity bits for error checking and
fault tolerance.
• XOR compares two input bits and generates
one output bit. The logic is simple.
• If the bits are the same, the result is 0. If the
bits are different, the result is 1.
Example: Buzzer
Game
BCA-III/CAO Dr. Ramandeep Kaur
16
x y xy
1 1 1
1 0 0
0 1 0
0 0 1
x o y = xy + x y
Example
For example, a hallway that has two
light switches.
If both light switches are in the same
position, the lights will be off.
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 17
1.
3.
5.
7.
9.
11.
13.
15.
17.
Commutative
Associative
Distributive
DeMorgan
’s
2.
4.
6.
8.
X . 1 X
=
X . 0 0
=
X . X X
=
0
=
X . X
10.
12.
14.
16.
X + Y Y + X
=
(X + Y) Z
+ X + (Y Z)
+
=
X(Y + Z) XY XZ
+
=
X + Y X . Y
=
XY YX
=
(XY)Z X(YZ)
=
X + YZ (X + Y)(X + Z)
=
X . Y X + Y
=
X + 0 X
=
+
X 1 1
=
X + X X
=
1
=
X + X
X = X
 Invented by George Boole in 1854
 An algebraic structure defined by a set B = {0, 1}, together with two
binary operators (+ and ·) and a unary operator ( )
Idempotence
Complement
Involution
Identity element
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 18
 Boolean Algebra is defined in general by a set B that can
have more than two values
 A two-valued Boolean algebra is also know as Switching
Algebra. The Boolean set B is restricted to 0 and 1.
Switching circuits can be represented by this algebra.
 The dual of an algebraic expression is obtained by
interchanging + and · and interchanging 0’s and 1’s.
 The identities appear in dual pairs. When there is only one
identity on a line the identity is self-dual, i.e., the dual
expression = the original expression.
 Sometimes, the dot symbol ‘’ (AND operator) is not written
when the meaning is clear
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 19
 The order of evaluation is:
1. Parentheses
2. NOT
3. AND
4. OR
 Consequence: Parentheses appear
around OR expressions
 Example: F = A(B + C)(C + D)
• A + A · B = A (Absorption Theorem)
Proof Steps Justification
A + A · B
= A · 1 + A · B Identity element: A · 1 = A
= A · ( 1 + B) Distributive
= A · 1 1 + B = 1
= A Identity element
BCA-III/CAO Dr. Ramandeep Kaur
Boolean Algebra and Logic Gates 20
BCA-III/CAO Dr. Ramandeep
Boolean Algebra and Logic Gates 21
BCA-III/CAO Dr. Ramandeep
Boolean Algebra and Logic Gates 22
BCA-III/CAO Dr. Ramandeep Kaur
23
1) .1
(1 ) 1 1
( )
1
X XY X XY
X Y XY Y
X XY XY
X Y X X
X Y X X
+ = +
= + + + =
= + +
= + +
= + + =
BCA-III/CAO Dr. Ramandeep Kaur
24
• Find the output of the following circuit and
realize its truth table
Answer: (x+y)y
BCA-III/CAO Dr. Ramandeep Kaur
25
x
y
x+y
y
(x+y)y
__
x
y
y
• Write the circuits for the following
Boolean algebraic expression
a) x+y
b) (x+y) x
BCA-III/CAO Dr. Ramandeep Kaur
26
__
____
BCA-III/CAO Dr. Ramandeep Kaur
27
BCA-III/CAO Dr. Ramandeep Kaur
28

More Related Content

Similar to Boolean Logic& Algebra.pptx

Similar to Boolean Logic& Algebra.pptx (20)

2dig circ
2dig circ2dig circ
2dig circ
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
De Mornan Theory, Boolean Algebra, 7 logical get, truth table,
De Mornan Theory, Boolean Algebra, 7 logical get, truth table,  De Mornan Theory, Boolean Algebra, 7 logical get, truth table,
De Mornan Theory, Boolean Algebra, 7 logical get, truth table,
 
DE notes
DE notesDE notes
DE notes
 
Logic gates ,flip flop ,registers and
Logic gates ,flip flop ,registers andLogic gates ,flip flop ,registers and
Logic gates ,flip flop ,registers and
 
Introduction to digital logic
Introduction to digital logicIntroduction to digital logic
Introduction to digital logic
 
BCA_Semester-II-Discrete Mathematics_unit-iii_Lattices and boolean algebra
BCA_Semester-II-Discrete Mathematics_unit-iii_Lattices and boolean algebraBCA_Semester-II-Discrete Mathematics_unit-iii_Lattices and boolean algebra
BCA_Semester-II-Discrete Mathematics_unit-iii_Lattices and boolean algebra
 
9. logic gates._rr
9. logic gates._rr9. logic gates._rr
9. logic gates._rr
 
Unit 3.1
Unit 3.1Unit 3.1
Unit 3.1
 
BOOLEAN ALGEBRA & LOGIC GATE
BOOLEAN ALGEBRA & LOGIC GATEBOOLEAN ALGEBRA & LOGIC GATE
BOOLEAN ALGEBRA & LOGIC GATE
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Digital Electronics basics book1_pdf.pdf
Digital Electronics basics book1_pdf.pdfDigital Electronics basics book1_pdf.pdf
Digital Electronics basics book1_pdf.pdf
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
sop_pos(DE).pptx
sop_pos(DE).pptxsop_pos(DE).pptx
sop_pos(DE).pptx
 
Chapter_11.pdf
Chapter_11.pdfChapter_11.pdf
Chapter_11.pdf
 
Chapter 3_Boolean Algebra _ Logic Gate (3).pptx
Chapter 3_Boolean Algebra _ Logic Gate (3).pptxChapter 3_Boolean Algebra _ Logic Gate (3).pptx
Chapter 3_Boolean Algebra _ Logic Gate (3).pptx
 
DLD Chapter-2.pdf
DLD Chapter-2.pdfDLD Chapter-2.pdf
DLD Chapter-2.pdf
 
Chapter 4 logic design
Chapter 4   logic designChapter 4   logic design
Chapter 4 logic design
 
B sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gatesB sc cs i bo-de u-ii logic gates
B sc cs i bo-de u-ii logic gates
 

Recently uploaded

Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring method
vimal412355
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 

Recently uploaded (20)

litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Overview of Transformation in Computer Graphics
Overview of Transformation in Computer GraphicsOverview of Transformation in Computer Graphics
Overview of Transformation in Computer Graphics
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
Dr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptxDr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptx
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Scouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring methodScouring of cotton and wool fabric with effective scouring method
Scouring of cotton and wool fabric with effective scouring method
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Danikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdfDanikor Product Catalog- Screw Feeder.pdf
Danikor Product Catalog- Screw Feeder.pdf
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/Footing
 
Post office management system project ..pdf
Post office management system project ..pdfPost office management system project ..pdf
Post office management system project ..pdf
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 

Boolean Logic& Algebra.pptx

  • 1. Lecture-1-3 Topics Covered • Boolean Algebra, Logic Gates BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 1
  • 2. • Binary variables take on one of two values(0,1). • Logical operators operate on binary values and binary variables. • Basic logical operators are the logic functions AND, OR and NOT. • Manipulation on binary information is done through logic circuits=Logic Gates – Logic gates implement logic functions. – Gates are blocks of hardware that produce signals of 1 or 0 when input logic requirements are satisfied. • The relationship between the input and output is based on a certain logic, hence the term= Logic Gates • Boolean Algebra: a useful mathematical system for specifying and transforming logic functions. – Boolean algebra as a foundation for designing and analyzing digital systems! BCA-III/CAO Dr. Ramandeep Kaur
  • 3. • The three basic logical operations are: – AND – OR – NOT • AND is denoted by a dot (·) or a concatenation. • OR is denoted by a plus (+). • NOT is denoted by an overbar ( ¯ ), a single quote mark (') after, or (~) before the variable. BCA-III/CAO Dr. Boolean Algebra and Logic Gates 3
  • 4. • Examples: is read “Y is equal to A AND B.” is read “y is equal to A OR B.” is read “Y is equal to NOT A.” BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 4 Here, Y is an output function, A & B are binary variables Note: The statement: 1 + 1 = 2 (read “one plus one equals two”) is not the same as 1 + 1 = 1 (read “1 or 1 equals 1”). = B A Y × B A Y + = A Y =
  • 5. • Logic gates have special symbols: BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 5 OR gate X Y Z = X + Y X Y Z = X ·Y AND gate X Z = X NOT gate or inverter
  • 6. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 6 OR Gate
  • 7. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 7 AND Gate
  • 8. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 8 NOT Gate
  • 9. • Tabular representation of Input-output relationship of binary variables for each gate is = Truth Table • Example: Truth tables for the basic logic operations, where Z is the output function, with x,y as input variables: BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 9 0 1 1 0 X NOT X Z= 1 1 1 0 0 1 0 1 0 0 0 0 Z = X·Y Y X AND OR X Y Z = X+Y 0 0 0 0 1 1 1 0 1 1 1 1
  • 10. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 10
  • 11. • Boolean equations, truth tables and logic diagrams describe the same function! • Truth tables are unique, but expressions and logic diagrams are not. This gives flexibility in implementing functions. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 11 X Y F Z Logic Diagram Logic Equation Z Y X F + = Truth Table 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 1 1 0 0 1 0 1 0 0 1 0 0 0 0 X Y Z Z Y X F × + =
  • 12. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 12 •Obtain the Truth Table of the above function •Draw the logic diagram using Boolean expression
  • 13. NAND (NOT - AND ) is the complement of the AND operation. 13 Computer Organization MCA 107 by Ruby Dahiya
  • 14. NOR (NOT - OR) is the complement of the OR operation. 14 Computer Organization MCA 107 by Ruby Dahiya
  • 15. • Writing XOR using and/or/not • x  y = x y+x y BCA-III/CAO Dr. Ramandeep Kaur 15 x y xy 1 1 0 1 0 1 0 1 1 0 0 0 _ _ • eXclusive OR) A Boolean logic operation that is widely used in cryptography as well as in generating parity bits for error checking and fault tolerance. • XOR compares two input bits and generates one output bit. The logic is simple. • If the bits are the same, the result is 0. If the bits are different, the result is 1. Example: Buzzer Game
  • 16. BCA-III/CAO Dr. Ramandeep Kaur 16 x y xy 1 1 1 1 0 0 0 1 0 0 0 1 x o y = xy + x y Example For example, a hallway that has two light switches. If both light switches are in the same position, the lights will be off.
  • 17. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 17 1. 3. 5. 7. 9. 11. 13. 15. 17. Commutative Associative Distributive DeMorgan ’s 2. 4. 6. 8. X . 1 X = X . 0 0 = X . X X = 0 = X . X 10. 12. 14. 16. X + Y Y + X = (X + Y) Z + X + (Y Z) + = X(Y + Z) XY XZ + = X + Y X . Y = XY YX = (XY)Z X(YZ) = X + YZ (X + Y)(X + Z) = X . Y X + Y = X + 0 X = + X 1 1 = X + X X = 1 = X + X X = X  Invented by George Boole in 1854  An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+ and ·) and a unary operator ( ) Idempotence Complement Involution Identity element
  • 18. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 18  Boolean Algebra is defined in general by a set B that can have more than two values  A two-valued Boolean algebra is also know as Switching Algebra. The Boolean set B is restricted to 0 and 1. Switching circuits can be represented by this algebra.  The dual of an algebraic expression is obtained by interchanging + and · and interchanging 0’s and 1’s.  The identities appear in dual pairs. When there is only one identity on a line the identity is self-dual, i.e., the dual expression = the original expression.  Sometimes, the dot symbol ‘’ (AND operator) is not written when the meaning is clear
  • 19. BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 19  The order of evaluation is: 1. Parentheses 2. NOT 3. AND 4. OR  Consequence: Parentheses appear around OR expressions  Example: F = A(B + C)(C + D)
  • 20. • A + A · B = A (Absorption Theorem) Proof Steps Justification A + A · B = A · 1 + A · B Identity element: A · 1 = A = A · ( 1 + B) Distributive = A · 1 1 + B = 1 = A Identity element BCA-III/CAO Dr. Ramandeep Kaur Boolean Algebra and Logic Gates 20
  • 21. BCA-III/CAO Dr. Ramandeep Boolean Algebra and Logic Gates 21
  • 22. BCA-III/CAO Dr. Ramandeep Boolean Algebra and Logic Gates 22
  • 23. BCA-III/CAO Dr. Ramandeep Kaur 23 1) .1 (1 ) 1 1 ( ) 1 X XY X XY X Y XY Y X XY XY X Y X X X Y X X + = + = + + + = = + + = + + = + + =
  • 25. • Find the output of the following circuit and realize its truth table Answer: (x+y)y BCA-III/CAO Dr. Ramandeep Kaur 25 x y x+y y (x+y)y __ x y y
  • 26. • Write the circuits for the following Boolean algebraic expression a) x+y b) (x+y) x BCA-III/CAO Dr. Ramandeep Kaur 26 __ ____