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

Logical Function Simplification

This document discusses simplifying Boolean functions using Karnaugh maps. It introduces Boolean algebra concepts like truth tables, implicants, prime implicants, and covers the Karnaugh map method for simplifying 2, 3, and 4 variable functions. The goal is to find the simplest algebraic expression for a Boolean function by combining adjacent 1s in the Karnaugh map in the largest possible groups while ensuring all minterms are covered without redundancy.

Uploaded by

Gustavo Sánchez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Logical Function Simplification

This document discusses simplifying Boolean functions using Karnaugh maps. It introduces Boolean algebra concepts like truth tables, implicants, prime implicants, and covers the Karnaugh map method for simplifying 2, 3, and 4 variable functions. The goal is to find the simplest algebraic expression for a Boolean function by combining adjacent 1s in the Karnaugh map in the largest possible groups while ensuring all minterms are covered without redundancy.

Uploaded by

Gustavo Sánchez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

1

SIMPLIFICATION OF
BOOLEAN FUNCTIONS
April, 2020 Prof. Gustavo Sanchez
[email protected]
Professor Automation & Data Science
JK Lakshmipat University, India
2

MOTIVATION
3

• The truth table representation of a Boolean


function is unique
Boolean inputs
𝑌 = 𝐶′𝐵′𝐴 + 𝐶′𝐵𝐴+ 𝐶𝐵′𝐴 + 𝐶𝐵𝐴
C B A Y
8 AND operations
0 0 0 0 3 OR operations
0 0 1 1 Canonical form SOP: 3 variables: C,B,A

0 1 0 0 𝑌 = (𝐶 + 𝐵 + 𝐴)(𝐶 + 𝐵′ + 𝐴)(𝐶 ′ + 𝐵 + 𝐴)(𝐶 ′ + 𝐵′ + 𝐴)


0 1 1 1 8 OR operations
1 0 0 0 3 AND operations
Canonical form POS: 3 variables: C,B,A
1 0 1 1
1 1 0 0
𝑌=𝐴
Corresponding algebraic
1 1 1 1 expression is NOT unique
• It is possible to measure 4

the complexity of any


algebraic expression by
counting the number of
variables and operations it
requires

• We discuss a method to
generate the simplests
algebraic expressions for Prof. Maurice Karnaugh
any Boolean function: U.S.A scientist
Karnaugh maps
• Why is it convenient to generate
5

simplest expressions for a Boolean


function ?
• Cost
• Space
• Speed
• Energy
• Maintenance
BASIC
6

CONCEPTS
K-maps
7

• A K-map is a diagram made up of squares,


representing minterms or maxterms of the
function that is to be simplified.
• By recognizing various patterns, we can
derive alternative algebraic expressions,
from which the simplest can be selected.
Two-variable K-map
8

General K-map rule: any two adjacent squares


differ by only one variable, which is primed in one
square and unprimed in the other.
Three-variable K-map
9

Note: right/left edges are adjacent squares also!


Four-variable K-map
10
Gray code 11

Decimal Binary Gray


0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111 Frank Gray (1887-1969) was
11 1011 1110
a researcher at Bell Labs,
12 1100 1010
13 1101 1011 who made numerous
14 1110 1001 innovations in telecom
15 1111 1000
Adjacent squares
12
Sets of 2 adjacent squares
13
Sets of 2 adjacent squares
14
Sets of 4 adjacent squares
15
Sets of 4 adjacent squares
16
Sets of 8 adjacent squares
17
Sets of 8 adjacent squares
18
Adjacent squares with 1’s
19
Implicants
20

• A term P is an implicant of a Boolean function F, if


whenever P takes the value 1 so does F.

• For instance, implicants of the function:


𝑓(𝑥, 𝑦) = 𝑥 + 𝑦
are 𝑥, 𝑦 but also 𝑥𝑦, 𝑥 ′ 𝑦, 𝑥𝑦′
Implicants
21

• All implicants can be represented by sets of adjacent


squares.


𝑤 𝑥𝑦𝑧+ 𝑤𝑥𝑦𝑧 =

𝑤 + 𝑤 𝑥𝑦𝑧 = 𝑥𝑦𝑧
𝑤𝑥𝑦𝑧′ 𝑥𝑦
Implicants
22

𝑥𝑦
Implicants
23


𝑥 𝑦, 𝑥𝑦, 𝑦
Implicants
24

′ ′
𝑥𝑦 𝑧, 𝑦𝑧, 𝑥𝑦 , 𝑥𝑧 …
Prime ( ′ )
25

• We use the prime symbol ( ′ ) to denote the


complement of any Boolean variable, this is:


If 𝑥 = 1 then 𝑥 = 0

If 𝑥 = 0 then 𝑥 = 1
Prime integer
26

• An integer p > 1 is said to be prime if it


has no integer divisors other than 1 and
p itself.
Prime implicants
27

• A prime implicant is a term obtained by combining the


maximum possible number of adjacent squares in the
K-map.
• A single 1 (minterm) forms a prime implicant if it is not
adjacent to any other 1’s.
• Two adjacent 1’s form a prime implicant, provided
that they are NOT within a group of four adjacent
squares and so on.
28

METHOD
Simplication rules
29

When combining adjacent squares in a map, we


must ensure that:
1) all the minterms of the function are covered
2) the number of terms/variables in the expression
is minimized
3) there are no redundant terms
Two-variable K-map
30

• The number of adjacent squares to be combined must be a


power of two, such as 2, or 4, as large as possible.
• As more adjacent squares are combined, we obtain a
product term with fewer literals:
• One square represents one minterm, giving a term with
two literals.
• Two adjacent squares represent a term with one literal.
• Four adjacent produce a function that is always equal to
1.
Two-variable K-map
31

x y f 𝑓 = 𝑥 𝑦 + 𝑥𝑦 + 𝑥𝑦
′ ′
0 0 0 𝑓 = 𝑚1 + 𝑚2 + 𝑚3
0 1 1
1 0 1
1 1 1
𝑓 =𝑥+𝑦
Let’s try to combine
adjacent squares: 2 or 4!
Three-variable K-map
32

• The number of adjacent squares to be combined must be a


power of two, such as 2, 4, or 8, as large as possible.
• As more adjacent squares are combined, we obtain a
product term with fewer literals:
• One square represents one minterm, giving a term with
three literals.
• Two adjacent squares represent a term with two literals.
• Four adjacent squares represent a term with one literal.
• Eight adjacent squares produce a function that is always
equal to 1.
Three-variable K-map
33

x y z F 𝑓 = 𝑚2 + 𝑚3 + 𝑚4 + 𝑚5
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
′ ′
𝑓 = 𝑥 𝑦+𝑥𝑦 = 𝑥 ⊕ 𝑦
Three-variable K-map
34

x y z F 𝑓 = 𝑚3 + 𝑚4 + 𝑚6 + 𝑚7
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1

𝑓 = 𝑦𝑧+𝑥𝑧
Three-variable K-map
35

x y z F 𝑓 = 𝑚0 + 𝑚2 + 𝑚4 + 𝑚5 + 𝑚6
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0

𝑓 = 𝑧 + 𝑥𝑦′
Four-variable K-map
36

• The number of adjacent squares to be combined must be a


power of two, such as 2, 4, 8 and 16 as large as possible.
• As more adjacent squares are combined, we obtain a
product term with fewer literals.
• One square represents one minterm, giving a term with
four literals.
• Two adjacent squares represent a term with three literals.
• Four adjacent squares represent a term with two literals.
• Eight adjacent squares represent a term with one literal.
Four-variable K-map
37

′ ′ ′
𝑓 = 𝑤 𝑧 + 𝑥𝑧 + 𝑦′
Four-variable K-map
38

Not canonical form!

′ ′ ′ ′ ′
𝐹 = 𝐵 𝐶 + 𝐵 𝐷 + 𝐴 𝐶𝐷′
Essential prime implicants
39

• If one minterm is covered by only one


prime implicant, that prime implicant is
said to be essential
Essential prime implicants
40

• The simplified expression is obtained from the


logical sum of all the essential prime implicants,
plus other prime implicants that may be needed
to cover remaining minterms.
• Occasionally, there may be more than one way
of combining squares, each one producing an
equally simplified expression.
Essential prime implicants
41
POS simplification
42

• The minterms not included in the standard SOP form


denote the complement of the function.
• If we mark the empty squares by 0’s and combine
them into valid adjacent squares, we obtain a
simplified SOP expression of the complement of the
function: F’
• The complement of F’ gives us back the function F in
POS form (De Morgan’s theorem)
POS simplification
43
“Do not care” conditions
44

• In some applications the function is not specified for


certain combinations of the variables, this is: we do not
care what value is assumed by the function for those
unspecified minterms.
• To distinguish the don’t-care condition an X is used.
• When simplifying the function, we can choose to
include each don’t-care minterm with either 1’s or 0’s,
depending on which gives the simplest expression.
“Do not care” conditions
45
Problems
46
Problems
47
Problems
48

You might also like