0% found this document useful (0 votes)
56 views

Module 4b Logic Simplification (Student)

1) The document discusses simplification of Boolean algebra expressions and provides examples. 2) Boolean expressions can be represented in Sum-of-Products (SOP) or Product-of-Sums (POS) form. 3) SOP form represents a Boolean expression as the sum of product terms, where a product term is the product of literals. POS form represents the expression as the product of sums of literals.

Uploaded by

Ghana Kumaran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Module 4b Logic Simplification (Student)

1) The document discusses simplification of Boolean algebra expressions and provides examples. 2) Boolean expressions can be represented in Sum-of-Products (SOP) or Product-of-Sums (POS) form. 3) SOP form represents a Boolean expression as the sum of product terms, where a product term is the product of literals. POS form represents the expression as the product of sums of literals.

Uploaded by

Ghana Kumaran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

10/23/12

Simplification using Boolean algebra

•  Simplification:
–  To reduce an expression to its simplest form
–  To change a form to a more convenient one for
efficient implementation

•  We use:-
–  basic laws, rules, theorems of Boolean algebra

•  Practice makes perfect!

1
FACULTY OF COMPUTER SCIENCE & INFORMATION SYSTEM
2

Example:
Ex
tr
a

1 A+0=A
2 A+1=1
Exercise 4b.1: According the the example given before, draw
3 A 0=0 the logic circuit for the original expression and
4
5
A 1=A
A+A=A
the last expression simplified.
6 A+A=1
7 A A=A AB + A(B+C) + B(B+C)
8 A A=0
9 A=A
10 A + AB = A
11 A + AB = A + B
12 (A + B)(A + C) = A + BC

3 4

Example: Example:

Ex
1 A+0=A
2 A+1=1
3 A 0=0 tr
4 A 1=A a
5 A+A=A
6 A+A=1
7 A A=A Exercise 4b.2:
8 A A=0

According the the


9 A=A
10 A + AB = A
11 A + AB = A + B example, draw
12 (A + B)(A + C) = A + BC
the logic circuit
for the original
expression and
the last
expression
simplified.

5 6

2012/2013-1 @m 1
10/23/12

Forms of Boolean expressions (Refer to module page 120)

•  Boolean expression can be converted into one of 2 forms.

A =1
Forms of Boolean
expressions

SOP POS
(Sum-of-Products) (Product-of-Sum)

ABC + ABC (A + B + C)(A + B + C)


A =1
•  Product term = a term with the product (Boolean
multiplication) of literals
•  Sum term = a term with the sum (Boolean addition) of
literals

7 8

Ex Ex
tr tr
a a
(Refer to module page 120)

Exercise 4b.3: Represent the following Boolean expression: Exercise 4b.4:


(i) ABC + ABC + ABC as a sigma notation A Boolean expression is written in sigma notation as
(ii) (A + B + C)(A + B + C)(A + B + C)(A + B + C) X= ∑ (7, 4, 3) . Determine the logic level (binary value) for
ABC
as a PI notation. each product term and write whole expression.

10
9 10

Ex
tr
a The Sum-of-Product (SOP) form
Exercise 4b.5:
A Boolean expression is written in PI notation as •  SOP = when 2 or more product terms are
X= ∏ (7, 4, 3). Determine the logic level (binary value) for summed
ABC
each sum term and write whole expression. . •  e.g ABP1 + ABCP2
ABCP1 + CDEP2 + BCDP3
•  SOP can also contain a single variable term

•  In SOP a single overbar cannot extend over more


than 1 variable, but more than 1 variable can have
an overbar.

ABC þ ABC ý
11
11 12

2012/2013-1 @m 2
10/23/12

Ex
tr
a

•  Implementation of the SOP expression


Exercise 4b.6: Convert each of the following Boolean
AB + BCD + AC expressions to SOP form:

A (i) AB + B(CD + EF)


B
(ii) (A + B)(B + C + D)
B
C X = AB + BCD + AC
D (iii) (A + B) + C
A
C

13 14

Standard for of Boolean expressions Product term à Standard SOP

•  Standardization makes the evaluation, simplification, and


implementation of Boolean expressions more systematic
and easier.

Conversions to
Standard Forms
•  A standard SOP /
POS form is when
ALL the variables
SOP POS
appear in each
product term /
sum term of the Rule 6: Rule 8:
Rule 12: Rule 6: (A + Ā)=1
expression. A + A =1 A• A = 0
(A + BC) = (A + B)(A + C)

15 16

Rule 6: (A + Ā)=1
Example:
Term 1: ABC = ABC ( D + D) = ABCD + ABC D
•  Convert this Boolean expression to standard SOP
form: Term 2 : AB = ABC + ABC
ABC + AB + ABC D
= ABC ( D + D) + ABC ( D + D) = ABCD + ABC D + ABC D + ABC D
Solution:

•  Variables = A, B, C, D.
•  What is missing? •  Now we have
–  Term 1: missing D or D’
–  Term 2: missing (C/C’) and (D/D’)
ABC + AB + ABC D
•  Complete these terms by applying Boolean rule 6
= ABCD + ABC D + ABCD + ABC D + ABC D + ABC D + ABC D
continue...
17 18

2012/2013-1 @m 3
10/23/12

Ex
tr
Rule 6: (A + Ā)=1 a
Binary representation of a
Standard product term
Exercise 4b.7: Define the variables of SOP expression in
•  A product = 1 only if ALL variables
in the term is equal to 1.
Exercise 4b.6(iii) and convert the expression ABC + ABC = 1
–  Remember:
to standard SOP form.
product = multiplication è 1.1 = 1
AC + BC
•  A sum = 1 when ONE
or ALL of the variables SOP
SOP
in the term is equal to 1.
–  Remember:
sum = addition è Product1 Product2 Product3

1 + 0 = 1;
0 + 1 = 1; Var1 Var1 Var1
1+1=1
19 20

Example:
1 From the standard SOP
it is easy to generate
the truth table.

1111

1001

0000

continue...
21 22

The Product-of-Sum (POS) form

•  POS = when 2 or more sum terms are •  Implementation of the POS expression
multiplied. (A + B)(B + C + D)(A + C)
–  (A + B)S1(A + B + C)S2
–  (A + B + C)S1(C + D + E)S2(B + C + D)S3
A

•  Like SOP, POS B


–  can also contain a single variable term B
–  a single overbar cannot extend over more than 1 C X = (A + B)(B + C + D)(A + C)
variable, but more than 1 variable can have an D
overbar. A

A+ B+C þ A+ B+C ý C
23 24

2012/2013-1 @m 4
10/23/12

Example:
•  Standard POS form = where all the variables appear
in each sum term in the expression. •  Convert this Boolean expression to standard POS
form
•  To convert product terms to standard POS ( A + B + C )( B + C + D)( A + B + C + D)
–  Multiply each of the nonstandard term with the missing
term using Boolean algebra rule
Rule8:8: (A . Ā) = 0
Solution:
•  Variables = A, B, C, D.
–  Apply rule
Rule1212:
: A (A
+ BC = (A=+(A
+ BC) B)(A + C) + C)
+ B)(A
•  What is missing?
–  Term 1: missing D or D’
–  Repeat until all variables appear in each sum term.
–  Term 2: missing A or A’

continue...
25 26

Ex
tr
a

•  Apply rules 8 and 12


Exercise 4b.8: Convert the following Boolean expressions to
Rule 8: (A . Ā) = 0 Rule 12: (A + BC) = (A + B)(A + C) POS form: (A + B)(B + C)

Term 1 : A + B + C = A + B + C + D D = ( A + B + C + D)( A + B + C + D)

Term 2 : B + C + D = B + C + D + A A
= ( A + B + C + D)( A + B + C + D)

•  Now we have
( A + B + C )( B + C + D)( A + B + C + D)
= ( A + B + C + D)( A + B + C + D)( A + B + C + D)( A + B + C + D)( A + B + C + D)
27
28

Binary representation of a
Standard Sum term
•  A product = 0 only if ONE or MORE Example: Determine the binary value for which following
of the sum term is equal to 0.
standard POS expression is equal to 0
–  Remember:
product = multiplication è 1.1 = 1
(A + B + C + D) (A + B + C + D) (A + B + C + D)
(A + B + C)(A + B + C) = 0
•  A sum = 1 when ONE or Solution:
ALL of the variables in (A + B + C + D) = (0 + 0 + 0 + 0) = 0; A=0, B=0, C=0, D=0
POS
POS
the term is equal to 1.
(A + B + C + D) = (0 + 1 + 1 + 0) = 0; A=0, B=1, C=1, D=0
–  Remember:
sum = addition è Sum1 Sum2 Sum3 (A + B + C + D) = (1 + 1 + 1 + 1) = 0; A=1, B=1, C=1, D=1
1 + 0 = 1;
0 + 1 = 1; The POS expression equal 0 when ALL of the terms are 0.
Var1 Var1 Var1
1+1=1 continue...
29 30

2012/2013-1 @m 5
10/23/12

Converting Standard (SOP à POS)

From the standard POS,


it is easy to generate the truth table.
•  Binary values in
Standard Standard
a standard SOP
SOP POS
0 0 0 0 expression are
Then x is
not present in the Binary
If x is here
not here
equivalent values (x) If x is not Then x is
0 1 1 0 standard POS
here here
expression

1 1 1 1 31 continue...
32

Example: Convert the following SOP expression to an


equivalent POS expression.

A B C + A B C + A BC + AB C + A B C
•  Step 1: Evaluate each product term in the SOP
expression è i.e. determine the binary numbers A B C
of the product terms. Solution:
•  Variables = (A, B, C) = 3. So, 23 = 8
•  Step 2: Determine all the binary numbers not possible combinations.
included in Step 1.
A B C + A B C + A BC + A B C + A B C
000 010 011 101 111
•  Step 3: Write equivalent sum term for each
binary number from Step 2 and express in POS
form.

** Using a similar procedure, to go from POS to


SOP continue...
33 34

Example: Convert the following SOP expression to an Ex


equivalent POS expression. tr
a
A B C + A B C + A BC + AB C + A B C

A B C Output Exercise 4b.9: Convert the following SOP expressions to an


Solution: 0 0 0 1 equivalent POS expression: AC + BC
•  Variables = (A, B, C) = 3. So, 23 = 8 0 0 1 0
possible combinations. 0 1 0 1
0 1 1 1
A B C + A B C + A BC + A B C + A B C 1 0 0 0
000 010 011 101 111 1 0 1 1
1 1 0 0
•  The SOP have 5 of 8, so POS have the
1 1 1 1
other 3 (001, 100, 110)
è These 3 make
sum term = 0 (A + B + C)(A + B + C)(A + B +C)
0 0 1 1 0 0 1 1 0
35 36

2012/2013-1 @m 6
10/23/12

Boolean expressions and truth tables Standard SOP à truth tables

•  Step 1: determine variables and combinations of Example •  Develop a truth table for the standard SOP
binary values è input expression
ABC + ABC + ABC
•  Step 2: convert expression to Standard SOP/POS.
Solution •  Domain = A, B, C. combinations = 23 = 8
•  Step 3: find the binary values that make the •  What binary value makes the product term = 1?
product = 1(SOP)
Product=1 (SOP) or sum = 0 (POS)
Sum=0 ABC INPUTS OUTPUT PRODUCT
001 =111=1 TERM
A B C X
•  Step 4: the remaining combination will be ABC 0 0 0 0
–  Equal to 0 (SOP) 0 0 1 1 ABC
100 =111=1
0 1 0 0
–  Equal to 1 (POS) ABC 0 1 1 0
ABC
111 =111=1 1
1
0
0
0
1
1
0
•  Fill in the truth table 1 1 0 0
•  Fill the truth table 1 1 1 1 ABC

37 38

Standard POS à truth tables (Module: Page 129)

Example •  Develop a truth table for the standard POS expression

(A + B + C)(A + B + C)(A + B +C)(A + B + C)(A + B +C) Exercise 4b.10:


i)
Solution •  Domain = A, B, C. combinations = 23 = 8
ii)
•  What binary value makes the sum term = 0?

INPUTS OUTPUT PRODUCT


(A + B + C)(A + B + C)(A + B +C)(A + B + C)(A + B +C) TERM
A B C X
0 0 0 0 1 0 0 1 1 1 0 1 1 1 0 (A + B + C)
0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 1 0 0 (A + B + C)
0 1 1 0 (A + B + C)
1 0 0 1
1 0 1 0 (A + B + C)
1 1 0 0 (A + B + C)
•  Fill the truth table 1 1 1 1
39 40

Determining Standard expression


from a truth table

•  Replace each binary number with its corresponding


variable.
SOP = 1→ var. & 0 → var. complement
POS = 0→ var. & 1 → var. complement

SOP POS
1010 ABCD 1001 A+B+C+D
ABCD = 1 0 1 0 A+B+C+D= 1+0+0+1
=1111=1 =0+0+0+0=0

41 42

2012/2013-1 @m 7
10/23/12

Ex
tr
a Karnaugh Map (K-Map)

Exercise 4b.11: INPUT OUTPUT •  K-Map is similar to the truth table, but it presents all of the
A B C X possible values of input and output.
0 0 0 0 •  This is shown in an array of cells.
From the truth table,
0 0 1 0 •  K-Maps can be used for expressions with 2,3,4 or 5
determine the:
0 1 0 0 variables.
0 1 1 1
(i)  standard SOP •  The number of cells in a K-Map = total number of possible
1 0 0 1
expression; and input variable combinations è 3 = 23 = 8
1 0 1 0
(ii)  equivalent standard •  Physically, cells that share their walls are adjacent
1 1 0 1
POS expression •  In a K-map with 4-variable or more, the top-most &
1 1 1 1
bottom-most cells of a column (and row) are adjacent.
continue...
43 44

K-Map SOP minimization


C C
0 1 0 1
Cells that differ
AB
00
AB
00 ABC ABC
•  K-Map is used to simplify Boolean expressions to their
by only one 00 00
minimum form.
01 01 ABC ABC
variable are 01 01 3-Variable Karnaugh Map
adjacent 11 11 ABC
11 ABC
(bersebelahan)
11
•  A minimized SOP expression :
10
10 10 ABC
10 ABC
–  has the fewest possible term with each term having
à Cell 010 is fewest possible variables.
adjacent to CD CD 00
000, 011 and AB
00
00 01
01 11
11 10
10
AB
00 01
01 11
11 10
10 –  needs fewer logic gates than standard expression.
00 00 ABCD ABCD ABCD ABCD
110 00 00
01 01 ABCD ABCD ABCD ABCD
01 01 •  To map an SOP expression to a map:
11 11 ABCD ABCD ABCD ABCD
11 11 –  Step 1: determine the binary value of each product
10
10 10 ABCD
10 ABCD ABCD ABCD term
–  Step 2: Place a 1 in a cell that have the same value
4-Variable Karnaugh Map
as the product term
45 46

SOP Example: •  Map the following expression SOP

Example: ABC + ABC + ABC + ABC ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD


C ABC + ABC + ABC + ABC
0011 0100 1101 1111 1100 0001 1010
AB
0 1 000 001 110 100
ABCD
00 1 1 CD
AB 00 01 11 10
01 00 1 1 ABCD

01 1
11 1 ABCD
11 1 1 1

10 1 ABCD 10 1 ABCD

ABCD ABCD
47 48

2012/2013-1 @m 8
10/23/12

K-Map simplification of
SOP expression
•  To use K-Maps, expressions must be in standard form.
•  For expressions that are not standard, it must be converted •  There are 3 steps to obtain a minimum SOP
to a standard form. expression from a K-Map.
•  Recall: AB + ABC SOP / Rule 6: (A + Ā)=1
–  AB(C/C’)  11(1/0)  ABC + ABC’ 1.  Grouping the 1s
C
–  So: ABC + ABC’ + ABC 0 1
AB
•  Map the following expression on a K-Map:
00 1 1
2.  Determine product term for each group
A + AB + ABC
01 1 1
000 100 110
11 1
3.  Summing the resulting product terms
001 101
010
10 1 1
011

49 50

Grouping the 1s

(a) (b) (c) (d)


•  Group must contain cells in 2x combination (i.e. C C CD CD
AB 0 1 AB
1, 2, 4, 8, 16 00 1
AB
00
0
1
1
1
AB
00 1
00 01
1
11 10
00
00
1
01 11 10
1
•  Each cell must be adjacent to at least 1 other cell 01 1 01 1 01 1 1 1 1 01 1 1 1
in the group, but all cells in a group need not be 11 1 1 11 1 11 11 1 1 1
adjacent 10 10 1 1 10 1 1 10 1 1 1
•  Try to have the biggest possible group of 1s
•  Each 1 must be in at least one group. AB
C
0 1
C
0 1
CD CD
AB AB 00 01 11 10 AB 00 01 11 10
•  The 1s already in a group may be included in 00 1 00 1 1 00 1 1 00 1 1

another group so long as the overlapping group 01 1 01 1 01 1 1 1 1 01 1 1 1


includes non-common 1s 11 1 1 11 1 11 11 1 1 1

•  Here are some examples: 10 10 1 1 10 1 1 10 1 1 1

51 52

•  For a 3-variable map


Determining minimum SOP expression –  A 1-cell group è 3-variable product term
–  A 2-cell group è 2-variable product term
from a K-Map –  A 3-cell group è 1-variable term
–  An 8-cell group è expression value = 1
•  Œ Within each group made, only choose the
A'C'
variables that occur in one form : complemented A'B'C'
or un-complemented. This is called contradictory C C
variables. AB 0 1 AB 0 1
1 B'
C CD
00 00 1 1
AB 0 1 AB 00 01 11 10

•   determine the minimum


00 1 00 1 1
01 1 01 1
01 1 01 1 1 1 1 BC
product term for each group. 11

10
1 1 11

10 1 1
11 1 1 11 1
AC'
10 10 1 1
•  Ž When the minimum product terms are derived,
AB
sum them to form the minimum SOP
continue... ABC + BC + AB AC + B + AC continue...
53 54

2012/2013-1 @m 9
10/23/12

•  For a 4-variable map


–  A 1-cell group è4-variable product term
–  A 2-cell group è 3-variable product term
Example:
–  A 3-cell group è 2-variable term
–  An 8-cell group è 1-variable term Given:
–  A 16-cell group è expression value = 1
BCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD+ ABCD + ABCD
BC'
•  Change it to standard SOP expression
CD CD
AB 00 01 11 10 AB 00 01 11 10
ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD+ ABCD + ABCD
00 1 1 00 1 1
A'C'
01 1 1 1 1 01 1 1 1 CD
•  Map it and get the AB 00 01 11 10
11 11 1 1 1
A'B
minimized SOP 00 1 1 1
10 1 1 10 1 1 1 AB'C expression 01 1 1
D BC + D
11 1 1
D'
10 1 1 1
AB'D
BC
AC + AB + ABD D + BC + ABC
55 56

Ex
tr
a
Mapping directly K-Map
Exercise 4b.12: Use a Karnaugh map to minimize the from a truth table
following standard SOP. X = ABC + ABC + ABC + ABC

Example: INPUTS OUTPUT


ABC + ABC + ABC + ABC + ABC C
A B C X AB 0 1

00 1
0 0 0 1
0 0 1 0 01

0 1 0 0 11 1 1
0 1 1 0
10 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

57 58

‘Don’t Care’ conditions

•  Sometime there are certain combinations of input variable •  “don’t care” terms can be used with K-maps to produce
that is not allowed. better results
–  Eg. 6 invalid combinations in BCD code (1010, 1011, –  Used as part of a group è the larger the group, the
1100, 1101, 1110, 1111)
simpler the resulting term will be
–  When grouping 1s, the Xs can be treated as 1 to make the
•  These states will never occur in an application using BCD
group larger
code, hence they can be treated as “don’t care” terms.
–  the Xs is treated as 0s if they cannot be used to
•  “don’t care” terms may be assigned either a 1 or a 0; it advantage.
does’nt matter as it will never occur.

continue...
59 60

2012/2013-1 @m 10
10/23/12

Ex
tr
a

Exercise 4b.13: Use a Karnaugh map to minimize a standard


Example:
SOP expression ABC + ABC + ABC + ABC + ABC.
(Use “don’t care” terms, d(6, 7) into the
K-maps to produce better results)

Invalid
input for
BCD

61 62

K-Map POS minimization

•  For POS expression in standard form, a 0 is


put in the K-map for each sum term. C (A + B +C)(A + B +C)(A + B +C)(A + B +C)
AB 0 1
•  The methods are similar to SOP minimization, 000 010 110 101
except 0 is used. 00 0

01 0
•  To map a Standard POS expression: 11 0
–  Step 1: Determine the binary value of each
sum term (i.e. that makes the sum term = 10 0
0)
–  Step 2: Check result and place a 0 on the (The methods are similar to SOP minimization,
corresponding cell in K-map except 00 is used for POS)
continue...
63 64

K-Map simplification of
POS expression
Example: Try mapping the following Standard POS expression
into the K-Map: •  The process is basically the same as with SOP
(A + B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D) expressions:
1100 1011 0010 1111 0011 –  Group 0s instead of 1s
(A + B + C + D) –  The rules of grouping 0s are the same as
CD
00 01 11 10 those for 1s
AB
00 0 0 (A + B + C + D) –  Expression must be in Standard POS form
01
(A + B + C + D)
11 0 0 (A + B + C + D)
10 0

(A + B + C + D)
65 66

2012/2013-1 @m 11
10/23/12

Example: (A + B + C)(A + B + C)(A + B + C)(A + B + C)(A + B + C) Example:

Minimize this POS expression using a K-Map:


(B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D)
0

•  Change it to standard POS form


(A + B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D)

•  Get the binary values


1
(0000)(1000)(0010)(1001)(0100)(1100)

continue...
67 68

Converting between POS and SOP


using K-Map
•  Map it, then group the 0s
•  A mapped SOP expression can be converted to
CD
00 01 11 10 an equivalent POS expression.
AB A+B+D
00 0 0 •  This is a good way to compare which can be
01 0 implemented using fewer gates.
C+D
11 0 •  Given a minimum POS map, the 1s will yield a
standard SOP expression.
10 0 0
•  This SOP expression can then be minimized by
A+B+C grouping the 1s.
•  Minimum POS expression
(C + D) (A + B + C) (A + B + D)
69 70

Example: Converting between POS and SOP using K-Map

continue...
71 72

2012/2013-1 @m 12
10/23/12

Example: Given the logic circuit below, simplify using


boolean and DeMorgan’s theorem.

X = (ABC)C + ABC + D
continue...
73 74

continue...
75 76

77

2012/2013-1 @m 13

You might also like