You are on page 1of 50

CHAPTER 3

BOOLEAN ALGEBRA
Lesson Outcome
At the end of the lesson, students
should be able to describe and
explain:
• Boolean Operations and Expressions
• Laws and Rules of Boolean Algebra
• De Morgan’s Theorems
• Boolean Analysis of Logic Circuits
• Standard Forms of Boolean Expressions (SOP and POS)
• Simplification using Boolean Algebra
• Karnaugh Map Minimization up to 4 variables (SOP and POS)
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 94


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 95


SIMPLIFICATION OF
BOOLEAN ALGEBRA
• There are 2 methods to simplify Boolean
equations

Boolean Algebra Theorem


1. Boolean Laws and rules Karnaugh Map (K-Map)
2. DeMorgan’s theorems

ECE351 Chapter 3: Boolean Algebra 96


BOOLEAN ALGEBRA THEOREMS
Boolean Rules

1 A  0  A
2 A 1  1

3 A 0  0
4 A 1  A
5 A A  A

6 A A  A
7 A A  A
8 A A  0
9 A A

ECE351 Chapter 3: Boolean Algebra 97


BOOLEAN ALGEBRA THEOREMS
Boolean Rules
10 A B  B  A
11 A B  B  A
12 A  B  C    A  B   C  A  B  C
A  B  C    A  B C  ABC
13
14 AB  C   AB  AC

15  A  BC  D  AC  AD  BC  BD
16 A  AB  A @ A( A  B)  A

17 A  AB  ( A  A)( A  B )
 A B
@
A  BC  ( A  B )( A  C )

18 A  BC   A  B  A  C 
ECE351 Chapter 3: Boolean Algebra 98
BOOLEAN SIMPLIFICATION
Example 1:
Simplify the equations 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
Example 2:
Simplify the equations
From rules no 17 : F  X  XY

 X  X X  Y 
 X Y
ECE351 Chapter 3: Boolean Algebra 99
BOOLEAN SIMPLIFICATION
Example 2:
Solution F  X  XY
 
 X  X X  Y 
 X Y
F  X  XY F  X  XY
 X 1  Y   X Y  X 1  Y   X Y
 
 X X  X  Y  XY 
 X X  X  Y  XY
 XX  X X  XY  X Y  XX  X X  XY  X Y
 XX  XY  X X  X Y (rules  15)  X (X  X ) Y(X  X )
 ( X  X )( X  Y )  X (1)  Y (1)
 X Y
 (1)( X  Y )  X  Y
 (1)( X  Y )  ( X  X )( X  Y )

ECE351 Chapter 3: Boolean Algebra 100


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 101


DE MORGAN’S THEOREM
Example 3:
Simplify the equations using De Morgan Theorem

F  ( A  C )  ( B  D)
 AC  B  D
 A  C  BD
 A C  B  D

where D  D and A  A

ECE351 Chapter 3: Boolean Algebra 102


DE MORGAN’S THEOREM
Example 4:
Simplify the equations using De Morgan Theorem


Y  AB  A B  C  B B  C   

ECE351 Chapter 3: Boolean Algebra 103


DE MORGAN’S THEOREM
Solution:
Simplify the equations using De Morgan Theorem


Y  AB  A B  C  B B  C   
 AB  A( B.C )  B( B.C )
 AB  AB.C )  ( B B)C
 AB  AB.C )  0
 AB(1  C )
 AB
ECE351 Chapter 3: Boolean Algebra 104
DE MORGAN’S THEOREM
Example 5:
Simplify the equations below Using NAND gate only
X  AB  AC
Solution
X  AB  AC
 AB  AC
Example 6:
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 105


BOOLEAN EXPRESSION

Sum of Product (SOP) Product of Sum (POS)


Consist of 2 or more AND terms Consist of 2 or more OR terms
that OR together. that AND together.

Standard form Standard form


Example Example
f  A, B, C   ABC  ABC f  A, B, C   ( A  B  C ).( A  B  C )

Non - Standard form Non - Standard form


Example Example
f  A, B, C   AB  BC f  A, B, C   ( A  B).( B  C )

ECE351 Chapter 3: Boolean Algebra 106


Conversion Non-Standard to standard SOP
Non- Standard SOP

f  A, B, C, D  ABD  ABCD Multiply with (C + C)

f  ABD  C  C   ABCD
f  ABDC  ABDC  ABCD Standard
SOP

ECE351 Chapter 3: Boolean Algebra 107


Conversion Non-Standard to standard POS
Non- Standard POS
 
f  A, B, C   A  B  A  B  C 
Addition with (CC)=0


 A  B  CC   A  B  C 
  
 A B C  A B C  A B C    Standard
SOP

Apply rules no 17
 A  B  CC
  
 A B C  A B C 

ECE351 Chapter 3: Boolean Algebra 108


STANDARD FORMS 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 of the output f.


f (A,B,C) = m2+m6+m3+m7
= Σm (2,3,6,7)
Product term (P/T) P/T Code P/T number

A0 ABC 010 m2


A 1 AB C 110 m6
Σ SOP = 0
ABC 011 m3
ABC 111 m7
ECE351 Chapter 3: Boolean Algebra 109
STANDARD FORMS 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 1 A B C 000 M0
A0 A B C 101 M5
A B C 011 M3
Π POS = 0 A B C 111 M7
ECE351 Chapter 3: Boolean Algebra 110
SOP POS CONVERSION
• Steps:
– Find the binary # for each term in
SOP / POS and evaluate it
– Find the combination of the binary #
that not include in (1)
– Derive equation for each binary in (2)

ECE351 Chapter 3: Boolean Algebra 111


SOP POS
f  ABC  ABC  ABC  ABC  ABC
• Step 1 • Step 2
ABC  111  7 4  100  A  B  C
AB C  110  6
3  011  A  B  C
A BC  101  5
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 112
POS SOP
 
f  A B C  A B C  A B C  
4  100  A  B  C ABC  111  7
3  011  A  B  C AB C  110  6
2  010  A  B  C A BC  101  5
A BC  001  1
A BC  000  0

f  ABC  ABC  ABC  ABC  ABC


ECE351 Chapter 3: Boolean Algebra 113
Convert SOP POS using
T/Table
• Steps
– Construct a Truth Table for a given
equation
– Identify the given equation is SOP or POS
– Find the binary number for the given
equation
– Output = 1 (SOP) while output = 0 (POS)

ECE351 Chapter 3: Boolean Algebra 114


Example 7: F  ABC  ABC  ABC
Input Output
A B C F
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Complete the truth table. What is the minterm of


output F?
ECE351 Chapter 3: Boolean Algebra 115
Solution: F  ABC  ABC  ABC
001 + 100 + 111

Input Output
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
ECE351 Chapter 3: Boolean Algebra 116
Example 8:
F  ( A  B  C )( A  B  C )( A  B  C )( A  B  C )( A  B  C )
Input Output
A B C F
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

Complete the truth table. What is the Maxterm of


output F?
ECE351 Chapter 3: Boolean Algebra 117
Solution:
F  ( A  B  C )( A  B  C )( A  B  C )( A  B  C )( A  B  C )
000 . 010 . 011 . 101 . 110

Input Output
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
ECE351 Chapter 3: Boolean Algebra 118
Example 9:
For given truth table, obtain:
a) SOP expression Input Output
b) POS expression A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

ECE351 Chapter 3: Boolean Algebra 119


Input Output
Solution: A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
a) SOP expression
F  ABC  ABC  ABC  ABC  ABC
a) POS expression
F  ( A  B  C )( A  B  C )( A  B  C )
ECE351 Chapter 3: Boolean Algebra 120
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.
2. Identify the map for adjacent 1.
3. Loop the adjacent 1, the loop can be in group of 8, 4, 2 or 1.
4. Form the expression
*SOP – map 1
* POS – map 0

ECE351 Chapter 3: Boolean Algebra 121


K-Map (cont…)

ECE351 Chapter 3: Boolean Algebra 122


K-Map a b
Input
c d
Output
x

- 4 inputs 0
0
0
0
0
0
0
1
1
1
0 0 1 0 0
0 0 1 1 1
0 1 0 0 1
0 1 0 1 1
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
ECE351 Chapter 3: Boolean Algebra 123
Solution: K-Map – 4 inputs

ECE351 Chapter 3: Boolean Algebra 124


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 more simple circuit being
produce.

ECE351 Chapter 3: Boolean Algebra 125


Example 10: Use K-Map to minimize Boolean expressions

a b c d f
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 126


Solution: Use K-Map to minimize Boolean expressions

ECE351 Chapter 3: Boolean Algebra 127


Design Procedures

1. Interpret the problem and set up the truth


table to describe its operation
2. Write the AND term for each case where the
output is ‘1’
3. Write the sum-of-product (SOP) expression
for the output
4. Simplify the expression using Boolean rules
or Karnaugh Map
5. Implement the circuit for the final expression
128
Example

• Problem Statement
• Design a logic circuit that has three inputs, A,
B and C and whose output will be ‘1’(high)
only when majority of the inputs is high.

Solution
Step 1
Interpret problem and set up the truth table
129
Step 1 :Truth Table

A B C X Step 2 :

0 0 0 0 Write the AND term for


each case where the
0 0 1 0 output is a ‘1’
0 1 0 0
0 1 1 1 AB C

1 0 0 0
1 0 1 1 AB C

1 1 0 1 AB C

1 1 1 1 AB C

130
Step 3
Write the SOP expression for the output

Step 4
Simplify the output expression (using K-Map)

131
Step 5
Implement the circuit for final expression

132
DESIGN QUESTION
• Steps:-
– Identify the input then build the truth table
– Identify the MSB and LSB bit
– Identify whether SOP or POS equation.
– Simplify using K-Map

ECE351 Chapter 3: Boolean Algebra 133


Example 11:

Develop a truth table and simplify the


expression of the system that produce a
HIGH output whenever the input
represented by 4 bits binary number is
greater than seven and less than twelve.
Label the input of the system as A, B, C
and D and the output as Y.

ECE351 Chapter 3: Boolean Algebra 134


1. Truth table: 2. SOP expression:
A B C D Y
0 0 0 0 0 Y  A B C D  A BC D 
0 0 0 1 0
0 0 1 0 0
ABC D  ABCD
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0 3. Simplify using K-Map:
0 1 1 0 0
0 1 1 1 0
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
Revision Chapter 3
1. Standard SOP:
F ( A, B, C )  ABC  ABC  ABC  ABC  ABC

2. Using Boolean Algebra, show the expression

F ( A, B, C )  AB  AC  B  ABC  ABC
can be simplified as

F ( A, B, C )  AC  B

136
3. State 2 methods that can be used to simplify Boolean
expressions.
a) A+B
b) A–B

4. Produce the truth table for expression

F ( A, B, C )  AC  AB  B
5. Explain the Karnaugh Map simplification technique.

6. Simplify the following POS expression using K-Map.

137
7. Answer the questions:

138
8. Answer the questions:

139
9. Answer the questions:

10. Answer the questions:

140
11.

141

You might also like