Boolean Algebra computer fundamentals
Boolean Algebra computer fundamentals
Learning Objectives
Boolean algebra
Fundamental concepts and basic laws of Boolean
algebra
Boolean function and minimization
Logic gates
Logic circuits and Boolean expressions
Ref. Page 60 Chapter 6: Boolean Algebra and Logic Circuits Slide 2/78
Boolean Algebra
Ref. Page 60 Chapter 6: Boolean Algebra and Logic Circuits Slide 3/78
Fundamental Concepts of Boolean Algebra
Ref. Page 60 Chapter 6: Boolean Algebra and Logic Circuits Slide 4/78
Operator Precedence
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 5/78
Operator Precedence
(Continued from previous slide..)
X Y Z
1st 2nd 3rd
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 6/78
Postulates of Boolean Algebra
Postulate 1:
(a) A = 0, if and only if, A is not equal to 1
(b) A = 1, if and only if, A is not equal to 0
Postulate 2:
(a) x 0 = x
(b) x 1 = x
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 7/78
Postulates of Boolean Algebra
(Continued from previous slide..)
Postulate 6:
(a) x x = 1
x =
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 8/78
Principle of Duality
For example, in the table below, the second row is obtained from
the first row and vice versa simply by interchanging ‘+’ with ‘.’
and ‘0’ with ‘1’
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 9/78
Some Important Theorems of Boolean Algebra
2 x+1=1 x 0 = 0
3 x + x y = x x x + y = x Absorption Law
4 x =x Involution Law
5 x x + y = x y x +x y = x + y
6 x y = x y x y = x y+ De Morgan’s
Law
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 10/78
Methods of Proving Theorems
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 11/78
Proving a Theorem by Using Postulates
(Example)
Theorem:
x+x·y=x
Proof:
L.H.S.
= x x y
= x 1 x y by postulate 2(b)
= x (1 y) by postulate 5(a)
= x (y 1) by postulate 3(a)
= x 1 by theorem 2(a)
= x by postulate 2(b)
= R.H.S.
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 12/78
Proving a Theorem by Perfect Induction
(Example)
Theorem:
x + x ·y = x
=
x y x y x+x y
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 13/78
Proving a Theorem by the
Principle of Duality (Example)
Theorem:
x+x=x
Proof:
L.H.S.
=xx
= (x x) 1 by postulate 2(b)
= (x x) (x + X) by postulate 6(a)
= x x X by postulate 5(b)
=x0 by postulate 6(b)
=x by postulate 2(a)
= R.H.S.
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 14/78
Proving a Theorem by the
Principle of Duality (Example)
(Continued from previous slide..)
Dual Theorem:
x x = x
Proof:
L.H.S.
= x x
= x x 0 by postulate 2(a) Notice that each step of
the proof of the dual
= x x xX by postulate 6(b)
theorem is derived from
= x (x + X ) by postulate 5(a) the proof of its
= x 1 by postulate 6(a) corresponding pair in
=x by postulate 2(b) the original theorem
= R.H.S.
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 15/78
Boolean Functions
Binary variables
An algebraic expression, or
A truth table
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 16/78
Representation as an
Algebraic Expression
W = X + Y ·Z
Variable W is a function of X, Y, and Z, can also be
written as W = f (X, Y, Z)
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 17/78
Representation as a Truth Table
X Y Z W
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 18/78
Representation as a Truth Table
(Continued from previous slide..)
F1 = x+y+z
x + y+z x +y+z x+ y+z
x+ y+z =M M M M M0 2 3 5 6
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 19/78
Expressing a Function in its
F1 x,y,z = Π 0,2,3,5,6
Product-of-Sums Form
Ref. Page 73 Chapter 6: Boolean Algebra and Logic Circuits Slide 20/78
A
C = A B
B
Inputs Output
A B C = A B
0 0 0
0 1 0
1 0 0
1 1 1
Inputs Output
A B C=A +B
0 0 0
0 1 1
1 0 1
1 1 1
A A
Input Output
A A
0 1
1 0
A
B C= A B= A
B= A +B
Inputs Output
A B C =A +B
0 0 1
0 1 1
1 0 1
1 1 0
Complemented OR gate
A
B C= A B= A B=A B
Inputs Output
A B C = A B
0 0 1
0 1 0
1 0 0
1 1 0
The three logic gates (AND, OR, and NOT) are logically
complete because any Boolean expression can berealized
as a logic circuit using only these three gates
A
A
NOT
D= A B + C
AND
B+C
B
C
OR
Ref. Page 80 Chapter 6: Boolean Algebra and Logic Circuits Slide 34/78
Finding Boolean Expression
of a Logic Circuit (Example 2)
OR
A A B
B
C= A +B A B
A B AND
AND NOT
Ref. Page 85 Chapter 6: Boolean Algebra and Logic Circuits Slide 35/78
Constructing a Logic Circuit from a Boolean
Expression (Example 1)
Boolean Expression = A B + C
AND
A A B
B
A B + C
C
OR
Ref. Page 85 Chapter 6: Boolean Algebra and Logic Circuits Slide 36/78
Constructing a Logic Circuit from a Boolean
Expression (Example 2)
Boolean Expression = A B + C D + E F
AND NOT
A A
B A B
B
AND AND
C C D
D A B + C D + E F
AND
E E F E F
F NOT
Ref. Page 85 Chapter 6: Boolean Algebra and Logic Circuits Slide 37/78
OR gate
Ref. Page 95 Chapter 6: Boolean Algebra and Logic Circuits Slide 38/78