Boolean algebra
Learning Objectives
In this chapter you will learn about:
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
An algebra that deals with binary number system
George Boole (1815-1864), an English mathematician, developed
it for:
Simplifying representation
Manipulation of propositional logic
In 1938, Claude E. Shannon proposed using Boolean algebra in
design of relay switching circuits
Provides economical and straightforward approach
Used extensively in designing electronic circuits used in computers
Ref. Page 60 Chapter 6: Boolean Algebra and Logic Circuits Slide 3/78
Fundamental Concepts of Boolean Algebra
Use of Binary Digit
Boolean equations can have either of two possible
values, 0 and 1
Logical Addition
Symbol ‘+’, also known as ‘OR’ operator, used for
logical addition. Follows law of binary addition
Logical Multiplication
Symbol ‘.’, also known as ‘AND’ operator, used for
logical multiplication. Follows law of binary
multiplication
Complementation
Symbol ‘-’, also known as ‘NOT’ operator, used for
complementation. Follows law of binary compliment
Ref. Page 60 Chapter 6: Boolean Algebra and Logic Circuits Slide 4/78
Operator Precedence
Each operator has a precedence level
Higher the operator’s precedence level, earlier it is evaluated
Expression is scanned from left to right
First, expressions enclosed within parentheses are evaluated
Then, all complement (NOT) operations are performed
Then, all ‘
’ (AND) operations are performed
Finally, all ‘’ (OR) operations are performed
(Continued on next slide)
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
Postulate 3: Commutative Law
(a) x y = y x
(b) x y = y x
(Continued on next slide)
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 7/78
Postulates of Boolean Algebra
(Continued from previous slide..)
Postulate 4: Associative Law
(a) x (y z) = (x y) z
(b) x (y z) = (x y) z
Postulate 5: Distributive Law
(a) x (y z) = (x y) (x z)
(b) x (y z) = (x y) (x z)
Postulate 6:
(a) x x = 1
x =
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 8/78
Principle of Duality
There is a precise duality between the operators . (AND) and +
(OR), and the digits 0 and 1.
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’
Column 1 Column 2 Column 3
Row 1 11=1 1+0=01=1 00=0
Row 2 0 0 = 0 0 1 = 1 0 = 0 1 1 = 1
Therefore, if a particular theorem is proved, its dual theorem
automatically holds and need not be proved separately
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 9/78
Some Important Theorems of Boolean Algebra
Sr. Theorems/ Dual Theorems/ Name
No. Identities Identities (if any)
1 x+x=x x x = x Idempotent Law
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
The theorems of Boolean algebra may be proved by using
one of the following methods:
1. By using postulates to show that L.H.S. = R.H.S
2. By Perfect Induction or Exhaustive Enumeration method
where all possible combinations of variables involved in
L.H.S. and R.H.S. are checked to yield identical results
3. By the Principle of Duality where the dual of an already
proved theorem is derived from the proof of its
corresponding pair
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.
(Continued on next slide)
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
A Boolean function is an expression formed with:
Binary variables
Operators (OR, AND, and NOT)
Parentheses, and equal sign
The value of a Boolean function can be either 0 or 1
A Boolean function may be represented as:
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)
The RHS of the equation is called an expression
The symbols X, Y, Z are the literals of the function
For a given Boolean function, there may be more than
one algebraic expressions
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
(Continued on next slide)
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 18/78
Representation as a Truth Table
(Continued from previous slide..)
The number of rows in the table is equal to 2n, where
n is the number of literals in the function
The combinations of 0s and 1s for rows of this table
are obtained from the binary numbers by counting
from 0 to 2n - 1
Taking the AND of these maxterms, we get:
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
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 21
Logic Gates
Logic gates are electronic circuits that operate on
one or more input signals to produce standard output
signal
Are the building blocks of all the circuits in a computer
Some of the most basic and useful logic gates are
AND, OR, NOT, NAND and NOR gates
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 22
AND Gate
Physical realization of logical multiplication (AND)
operation
Generates an output signal of 1 only if all input
signals are also 1
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 23
Gate (Block Diagram Symbol
and Truth Table)
A
C = A B
B
Inputs Output
A B C = A B
0 0 0
0 1 0
1 0 0
1 1 1
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 24
OR Gate
Physical realization of logical addition (OR) operation
Generates an output signal of 1 if at least one of the
input signals is also 1
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 25
OR Gate (Block Diagram Symbol
and Truth Table)
A
C=A+B
B
Inputs Output
A B C=A +B
0 0 0
0 1 1
1 0 1
1 1 1
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 26
NOT Gate
Physical realization of complementation operation
Generates an output signal, which is the reverse of
the input signal
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 27
NOT Gate (Block Diagram Symbol
and Truth Table)
A A
Input Output
A A
0 1
1 0
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 28
NAND Gate
Complemented AND gate
Generates an output signal of:
1 if any one of the inputs is a 0
0 when all the inputs are 1
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 29
NAND Gate (Block Diagram Symbol
and Truth Table)
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
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 30
NOR Gate
Complemented OR gate
Generates an output signal of:
1 only when all inputs are 0
0 if any one of inputs is a 1
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 31
NOR Gate (Block Diagram Symbol
and Truth Table)
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
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 32
Logic Circuits
When logic gates are interconnected to form a gating /
logic network, it is known as a combinational logic circuit
The Boolean algebra expression for a given logic circuit
can be derived by systematically progressing from input
to output on the gates
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
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 33
Finding Boolean Expression
of a Logic Circuit (Example 34)
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