lecture 4: more boolean algebra - wayne state university

22
ENGIN112 L6: More Boolean Algebra September 15, 2003 Lecture 4: More Boolean Algebra Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University

Upload: others

Post on 03-Apr-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

ENGIN112 L6: More Boolean Algebra September 15, 2003

Lecture 4: More Boolean Algebra

Syed M. Mahmud, Ph.D

ECE Department

Wayne State University

Original Source: Prof. Russell Tessier of University of Massachusetts

Aby George of Wayne State University

ENGIN112 L6: More Boolean Algebra September 15, 2003

Overview

° Expressing Boolean functions

° Relationships between algebraic equations, symbols, and truth tables

° Simplification of Boolean expressions

° Minterms and Maxterms

° AND-OR representations

• Product of sums

• Sum of products

ENGIN112 L6: More Boolean Algebra September 15, 2003

Conversion between Boolean Expression and Truth Table

Truth

Table

Boolean

Expression

ENGIN112 L6: More Boolean Algebra September 15, 2003

Truth Table to Expression

° What Boolean function is represented by the following Truth Table? Is it an AND or an OR function?

° The answer is AND because G1=1 only for one combination of x, y and z (x=1, y=1 and z=1).

• Therefore, G1 = xyz

x00001111

y00110011

z01010101

G100000001

ENGIN112 L6: More Boolean Algebra September 15, 2003

Truth Table to Expression

° What about G2 and G3?

° Both G2 and G3 represent AND operations because each one of these two functions is also equal to 1, only for one combination of x, y and z.

° G2=1 for x=1, y=1 and z=0, and G3=1 for x=0, y=1 and z=1.

• Therefore, G2 = xyz’ and G3 = x’yz

x00001111

y00110011

z01010101

G200000010

x00001111

y00110011

z01010101

G300010000

ENGIN112 L6: More Boolean Algebra September 15, 2003

Truth Table to Expression

° If G = G1+G2+G3, as shown in the following Truth Table, then

G = xyz + xyz’ + x’yz

x00001111

y00110011

z01010101

G100000001

G200000010

G300010000

G = G1+G2+G300010011

ENGIN112 L6: More Boolean Algebra September 15, 2003

Truth Table to Expression

° Converting a truth table to an expression

• Each row with output of 1 becomes a product term

• Sum all the product terms together.

x00001111

y00110011

z01010101

G00010011

xyz + xyz’ + x’yz

Any Boolean Expression can be

represented in sum of products form!

G = xyz + xyz' +x'yz

Product TermsSum of 3

Product Terms

ENGIN112 L6: More Boolean Algebra September 15, 2003

Implementation of the SOP Expression

SOP Expression: G = xyz + xyz' +x'yz

A SOP expression is implemented using one OR gate and

multiple AND gates.

This is not a minimum logic.

We will minimize later.

ENGIN112 L6: More Boolean Algebra September 15, 2003

Reducing the expression for G using Boolean Algebra

° G = xyz + xyz' +x'yz

° Step 1: Use Theorum 1 (a + a = a)

• So xyz + xyz’ + x’yz = xyz + xyz + xyz’ + x’yz

° Step 2: Use distributive rule a(b + c) = ab + ac

• So xyz + xyz + xyz’ + x’yz = xy(z + z’) + yz(x + x’)

° Step 3: Use Postulate 3 (a + a’ = 1)

• So xy(z + z’) + yz(x + x’) = xy.1 + yz.1

° Step 4: Use Postulate 2 (a . 1 = a)

• So xy.1 + yz.1 = xy + yz

° Therefore, G = xy + yz

ENGIN112 L6: More Boolean Algebra September 15, 2003

Reduced Hardware Implementation

° Reduced equation requires less hardware!

° Same function implemented!

x y z

x00001111

y00110011

z01010101

G00010011

G = xyz + xyz’ + x’yz = xy + yz

G

x x

xx

ENGIN112 L6: More Boolean Algebra September 15, 2003

Product of Sums (POS) Expression

Any Boolean Expression can be represented in Product

of Sums (POS) form. Let's find a POS expression for G.

We have shown how G was written in a

SOP expression.

Using the same technique we can write a

SOP expression for G'.

G' = x'y'z'+x'y'z+x'yz'+xy'z'+xy'z

Using DeMorgan's Theorem we can

convert the SOP expression for G' into a

POS expression for G

ENGIN112 L6: More Boolean Algebra September 15, 2003

Product of Sums (POS) Expression

G' = x'y'z'+x'y'z+x'yz'+xy'z'+xy'z

G = (G')' = (x'y'z'+x'y'z+x'yz'+xy'z'+xy'z)'

Using DeMorgan G=(x'y'z')'.(x'y'z)'.(x'yz')'.(xy'z')'.(xy'z)'

Using DeMorgan again

G=(x+y+z).(x+y+z').(x+y'+z).(x'+y+z).(x'+y+z')

Sum Terms

POS

Expression

ENGIN112 L6: More Boolean Algebra September 15, 2003

Summary of SOP and POS Expressions for G

SOP Expression:

G = xyz + xyz' +x'yz

POS Expression:

G=(x+y+z)(x+y+z')(x+y'+z)(x'+y+z)(x'+y+z')

Notice, the SOP expression has 3 Product terms and the POS

expression has 5 Sum terms.

There are 8 terms in both SOP and POS expressions together.

Why?

Because G is a function of 3 variable (x, y and z), and 3

variables have 8 different combinations.

• The 1's of G are used for SOP and the 0's of G are used

for POS.

ENGIN112 L6: More Boolean Algebra September 15, 2003

Implementation of the POS Expression

POS Expression:

G=(x+y+z)(x+y+z')(x+y'+z)(x'+y+z)(x'+y+z')

A POS expression is implemented using one AND gate and

multiple OR gates.

ENGIN112 L6: More Boolean Algebra September 15, 2003

Minterms and Maxterms

° The boolean variables and their complements are called Literals. For example, x is a literal, and y' is also a literal.

° The Product Terms of literals are called Minterms. The Sum Terms of literals are called Maxterms.

ENGIN112 L6: More Boolean Algebra September 15, 2003

Representing Functions with Minterms

° A SOP expression is a Sum of Minterms. The Minterms of a function correspond to the 1's of the function.

° Shorthand way to represent functions

x00001111

y00110011

z01010101

G00010011

G = x’yz + xyz’ + xyz

G = m3 + m6 + m7 = Σm(3, 6, 7)

ENGIN112 L6: More Boolean Algebra September 15, 2003

Representing Functions with Maxterms

° A POS expression is a Product of Maxterms. The Maxterms of a function correspond to the 0's of the function.

° Shorthand way to represent functions

G = (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)(x’+y+z’)

G = M0M1M2M4M5 = ΠM(0,1,2,4,5)

x00001111

y00110011

z01010101

G00010011

ENGIN112 L6: More Boolean Algebra September 15, 2003

Canonical Forms

° The Minterm and Maxterm expressions are also called Canonical Forms

x00001111

y00110011

z01010101

G00010011

G = m3 + m6 + m7 = Σm(3, 6, 7)

G = M0M1M2M4M5 = ΠM(0,1,2,4,5)

Canonical Forms

ENGIN112 L6: More Boolean Algebra September 15, 2003

Conversion Between Canonical Forms

° Easy to convert between Minterm and Maxtermexpressions.

° Since 3 variables can take 8 combinations, if there are NMinterms in the expression for a function, then there will be 8-N Maxterms in the expression for the function.

° Similarly, since 4 variables can take 16 combinations, if there are N Minterms in the expression for a function, then there will be 16-N Maxterms in the expression for the function.

IF F = Σ m(1, 3, 6, 7, 10, 12, 15)

THEN F = Π M(0, 2, 4, 5, 8, 9, 11, 13, 14)

Example:

ENGIN112 L6: More Boolean Algebra September 15, 2003

Representation in Circuits

° All logic expressions can be represented in 2-level format

° Circuits can be reduced to minimal 2-level representation

° Sum of products representations are most common in industry.

ENGIN112 L6: More Boolean Algebra September 15, 2003

Summary

° Truth table, circuit, and boolean expression formats are equivalent

° Easy to translate truth table to SOP and POS representation

° Boolean algebra rules can be used to reduce circuit size while maintaining function

° All logic functions can be made from AND, OR, and NOT

ENGIN112 L6: More Boolean Algebra September 15, 2003

Practice Problems

° Boolean algebra, Basic theorems and Postulates

• 2.1, 2.2, 2.3, 2.5, 2.6

° Boolean functions

• 2.8, 2.9, 2.11, 2.18

° Canonical and standard forms and digital logic gates

• 2.20, 2.22, 2.23, 2.27, 2.28