School of Electrical Engineering, College of Engineering, UiTM Pasir Gudang
DIGITAL SYSTEM 1
ECE 351
CHAPTER 3
BOOLEAN ALGEBRA
Edited by: Dr. Siti Hazurah Indera Putera
CO1-PO3, LO10-PLO3, DK5
At the end of this chapter students should
be able to:
❑ Perform Boolean operations using Boolean
Algebra theorem and De Morgan’s theorem
❑ Express Boolean equations in Product of Sum
(POS) and Sum of Product (SOP) standard form
❑ Perform conversion of Boolean equations from
POS form into SOP form and vice versa
❑ Simplify Boolean equations using Karnough
Map (K-Map)
ECE 351 Chapter 3: Boolean Algebra 2
3.1 INTRODUCTION
❑ Logic can be expressed in algebraic form
❑ Boolean algebra is a tool for analysis and
design of digital systems
❑ Boolean algebra consist of Boolean
constant and variables
ECE351 Chapter 3: Boolean Algebra 3
3.2 BOOLEAN OPERATIONS
ADDITION MULTIPLICATION
Equivalent to OR gate Equivalent to AND gate
Input Output Input Output
0+0 0 0.0 0
0+1 1 0.1 0
1+0 1 1.0 0
1+1 1 1.1 1
1+1+1 1 1.1.1 1
1.1.0 0
ECE351 Chapter 3: Boolean Algebra 4
3.3 SIMPLIFICATION OF
BOOLEAN ALGEBRA
• There are 2 methods to simplify Boolean
equations
Boolean Algebra
Theorem
1. Boolean Laws Karnaugh
and rules Map (K-Map)
2. DeMorgan’s
theorems
ECE351 Chapter 3: Boolean Algebra 5
3.3.1 BOOLEAN ALGEBRA
THEOREMS Boolean Rules
ECE351 Chapter 3: Boolean Algebra 6
Boolean Rules (Cont’d)
ECE351 Chapter 3: Boolean Algebra 7
3.3.2 BOOLEAN SIMPLIFICATION
Example 1: Simplify the following equation using
Boolean Algebra Theorem
(A + B)(A + C) = AA + AC + AB + BC
= A + AC + AB + BC
= A(1 + C + B) + BC
= A . 1 + BC
= A + BC
ECE351 Chapter 3: Boolean Algebra 8
3.3.2 BOOLEAN SIMPLIFICATION
Example 2: Simplify the following equation
using Boolean Algebra Theorem :
From rule no. 17 : F = X + XY = XX +
(
= X + X (X + Y ))
= X+Y
ECE351 Chapter 3: Boolean Algebra 9
3.2.3 DE MORGAN’S THEOREM
❑ Useful in simplifying expressions.
❑ 2 most important theorems
1. X Y = X + Y
2.
X + Y = X Y
Also valid for 3 or more inputs
X Y Z = X +Y + Z
X + Y + Z = X Y Z
ECE351 Chapter 3: Boolean Algebra 10
Example 3: Simplify the equations using De
Morgan Theorem
F = ( A + C ) ( B + D)
= A+C + B + D
= A C + BD
= A C + B D
where D = D and A = A
ECE351 Chapter 3: Boolean Algebra 11
Example 4: Simplify the equations using De
Morgan Theorem
(
Y = AB + A B + C + B B + C ) ( )
ECE351 Chapter 3: Boolean Algebra 12
Example 5: Simplify the equations using
Boolean Theorem
F = AC + A BC + ABCD + AB D
ECE351 Chapter 3: Boolean Algebra 13
Example 6: Simplify the equations below Using
NAND gate only
X = AB + AC
Solution
X = AB + AC
= AB AC
ECE351 Chapter 3: Boolean Algebra 14
Example 7: Simplify the equations below Using
NOR gate only
X = AB + AC
Solution
X = AB + AC
= A( B + C )
= A( B + C )
= A + (B + C)
ECE351 Chapter 3: Boolean Algebra 15
3.3 BOOLEAN EXPRESSION
Sum of Product Product of
(SOP) Sum (POS)
ECE351 Chapter 3: Boolean Algebra 16
3.3.1 SUM OF PRODUCT (SOP)
Consist of 2 or more AND terms that ‘OR’ ed
together.
Standard form
Example
f ( A, B, C ) = ABC + ABC
Non - Standard form
Example
f ( A, B, C ) = AB + BC
ECE351 Chapter 3: Boolean Algebra 17
3.3.2 Product of Sum (POS)
Consist of 2 or more OR terms that AND together.
Standard form
Example
f ( A, B, C ) = ( A + B + C )( A + B + C )
Non - Standard form
Example
f ( A, B, C ) = ( A + B )( B + C )
ECE351 Chapter 3: Boolean Algebra 18
3.3.3 Conversion Non-Standard to
standard SOP
Non- Standard
f ( A, B, C , D ) = ABD + ABC D SOP
Multiply with
(C + C)
f = A BD ( C + C ) + ABCD
f = A BDC + A BDC + ABC D Standard
SOP
ECE351 Chapter 3: Boolean Algebra 19
3.3.4 Conversion Non-Standard to
standard POS
Non- Standard
( )(
f ( A, B, C ) = A + B A + B + C ) POS
Addition with
(
= A + B + CC ) (A + B + C ) (CC)=0
( ) (
= A+ B +C A+ B +C A+ B +C ) ( )
Standard
Apply rule no 17
= A + B + CC SOP
(
= A+ B +C A+ B +C ) ( )
ECE351 Chapter 3: Boolean Algebra 20
3.4 MINTERM FOR STANDAR SOP
All variables must appear in each product term.
Example, the SOP expression of output f is:
f (A,B, C) = ABC + ABC + ABC + ABC
The minterm function of the output f is:
f (A,B,C) = m2 + m6 + m3 + m7 = Σm (2,3,6,7)
ECE351 Chapter 3: Boolean Algebra 21
Product term
P/T Code P/T number
(P/T)
ABC 010 m2
ABC 110 m6
ABC 011 m3
ABC 111 m7
A=0
A=1
ECE351 Chapter 3: Boolean Algebra 22
3.5 MAXTERM FOR
STANDARD POS
All variables must appear in each product term.
Example, the POS expression of output f is:
f (A,B, C) = ( A + B + C) • ( A + B + C) • ( A + B + C) • ( A + B + C)
The Maxterm function of the output f.
f (A,B,C) = M0 + M5 + M3 + M7 = Π M (0,3,5,7)
ECE351 Chapter 3: Boolean Algebra 23
3.5 MAXTERM FOR
STANDARD POS
All variables must appear in each product term.
Example, the POS expression of output f is
f (A,B, C) = ( A + B + C) • ( A + B + C) • ( A + B + C) • ( A + B + C)
• The Maxterm of the output f.
f (A,B,C) = M0+M5+M3+M7
= Π M (0,3,5,7)
Product term (P/T) P/T Code P/T number
A+ B +C 000 M0
A =1
A=0
A+ B +C 101 M5
A+ B +C 011 M3
Π POS = 0
A+ B +C 111 M7
ECE351 Chapter 3: Boolean Algebra 24
3.6 SOP POS CONVERSION
Steps:
1. Find the binary numbers for each term in SOP
/ POS
2. Find the combination of the binary numbers
that are not included in (1)
3. Derive equation for each binary number in (2)
ECE351 Chapter 3: Boolean Algebra 25
3.6.1 SOP POS
f = ABC + ABC + A BC + A BC + A BC
Step 1: Step 2:
ABC = 111 = 7
4 = 100 = A + B + C
ABC = 110 = 6
A BC = 101 = 5
3 = 011 = A + B + C
A BC = 001 = 1 2 = 010 = A + B + C
A BC = 000 = 0
Step 3: ( )(
f = A+ B +C • A+ B +C • A+ B +C )( )
ECE351 Chapter 3: Boolean Algebra 26
3.6.2 POS SOP
( )(
f = A+ B +C • A+ B +C • A+ B +C )( )
Step 2:
Step 1:
ABC = 111 = 7
4 = 100 = A + B + C
ABC = 110 = 6
3 = 011 = A + B + C
A BC = 101 = 5
2 = 010 = A + B + C A BC = 001 = 1
A BC = 000 = 0
Step 3:
f = ABC + ABC + A BC + A BC + A BC
ECE351 Chapter 3: Boolean Algebra 27
3.6.3 Convert SOP POS using
Truth Table
Steps
1. Construct a Truth Table for a given equation
2. Identify the given equation is SOP or POS
3. Find the binary number for the given equation
4. Output = 1 (SOP) while output = 0 (POS)
ECE351 Chapter 3: Boolean Algebra 28
Example 7: F = ABC + ABC + ABC
Input Output
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
ECE351 Chapter 3: Boolean Algebra 29
3.7 KARNAUGH MAP
❑Used to simplify Boolean equations and
convert a t/table to it’s logic gates
Steps:
1. Construct K-map and place 1’s in the
squares correspond to 1’s in t/table, then
place 0’s in other squares.
ECE351 Chapter 3: Boolean Algebra 30
KARNAUGH MAP (Cont’d)
2. Identify the map for adjacent 1 then loop
those 1. The loop can be in group of 8, 4, 2.
3. Form the expression
* SOP – map 1
* POS – map 0
ECE351 Chapter 3: Boolean Algebra 31
K-Map (cont’d…)
ECE351 Chapter 3: Boolean Algebra 32
3.7.1 K-Map - 4 inputs
ECE351 Chapter 3: Boolean Algebra 33
K-Map – 4 inputs (cont’d…)
ECE351 Chapter 3: Boolean Algebra 34
3.7.2 ‘DON’T CARE’ CONDITION
❑ Symbol represent don’t care ‘X’
❑ It can be either ‘1’ or ‘0’
❑ In K-Map, ‘X’ can be 1 to create a larger
group of SOP.
❑ Therefore, much simpler circuits are
produced.
ECE351 Chapter 3: Boolean Algebra 35
Example 10: Boolean expression using K-MAP
A B C D X
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 X
1 0 1 1 X
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 X
ECE351 Chapter 3: Boolean Algebra 36
Transfer to K-Map
CD
AB 00 01 11 10
00 0 0 0 0
01 0 0 1 0
11 X X X X
10 1 1 X X
ECE351 Chapter 3: Boolean Algebra 37
3.8 DESIGN QUESTION
Steps:-
1. Identify the input then build the truth table
2. Identify the MSB and LSB bit
3. Identify whether SOP or POS equation.
4. Simplify using K-Map
ECE351 Chapter 3: Boolean Algebra 38
Example:
Figure show a block diagram of an encoder that
can convert binary numbers into Gray code. The
conversion is given in Table .
Complete the conversion table Design a minimal
circuit output F2 using NAND gates ONLY.
A (MSB) F2 (MSB)
B Binary to F1
Gray
C (LSB) converter F0 (LSB)
ECE351 Chapter 3: Boolean Algebra 39
Binary i/p Gray (o/p)
A B C F2 F1 F0
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 1
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
ECE351 Chapter 3: Boolean Algebra 40
Transfer to K-Map for F2 output
C
AB 0 1
00
01
11
10
ECE351 Chapter 3: Boolean Algebra 41
Circuit for F2 using NAND gates only:
ECE351 Chapter 3: Boolean Algebra 42