You are on page 1of 19

Digital Logic and Design

Lecture No 15 : Possible Boolean Functions and Logics, Introduction to K Ma


BEE-12B, Fall 202
Dated 28 Oct 2021

By Nasir Mahmoo
nasir.mahmood@seecs.edu.pk
nasirm15@gmail.com

1
1

Learning Objective

● Given a function (completely or incompletely specified) of


three to five variables, plot it on a Karnaugh map and
use to simplify Boolean expressions. The function may
be given in minterms, maxterms, or algebraic form

● Reference Text Book section 3.1 to 3.3

2
Karnaugh Map Method
● Provides an alternative technique for representing
Boolean functions

● One Box/square on map is for each row i.e minterm


or maxterm of the function in Truth Table

● Karnaugh map's input values must be ordered such


that the values for adjacent columns vary by only a
single bit, for example, 00, 01, 11, and 10. This is
necessary to observe the variable transitions
● Known as a Gray code

Multiple Inputs K-Map

● Three and Four-variable maps

4
Two-Variable Map

● A two-variable map
holds four minterms for
two variables.
● Again, we mark the squares
of the minterms that belong
to a given function.
● Note that the sequence is not
arranged in a binary way.
● The sequence used, similar
to Gray code, allows only
one bit to change from
column to column and row to
row.

Three-Variable Map

● A three-variable map
holds eight minterms for
three variables.
● Again, we mark the squares
of the minterms that belong
to a given function.
● Note that the sequence is not
arranged in a binary way.
● The sequence used, similar
to Gray code, allows only
one bit to change from
column to column and row to
row.

Three-Variable Map

● Correction: Columns are yz and not xz in fig 3-3 (book)

7
Mapping Functions for three-
variable map
● When you have already been provided a function,
you can map the function into a K-map by
remembering
● the cells of a k-map represent minterms
● a 1 in a cell indicates that the minterm is part of the function
● two adjacent 1’s represent a two literal term
● four adjacent 1’s represent a one literal term
● eight adjacent 1’s represent a true function, F = 1

Minimization Characteristics in 3-Variable Maps

● Since any two adjacent cells in a 3-variable map


represent a change in only a single bit, we use this to
do minimization.
● Consider the two cells for m0 and m1 where the difference is the
negation of the bit z.
● F = m0 + m1 = x’y’z’ + x’y’z = x’y’(z’ + z) = x’y’

Four-Variable Map

● A four-variable map
holds 16 minterms for
four variables.
● Again, we mark the squares
of the minterms that belong
to a given function.
● Note that the sequence is not
arranged in a binary way.
● The sequence used is a
Gray code and allows only
one bit to change from
column to column and row to
row.

10

4-Variable Map
Minterms Labeling

11
Minimization Example

● Each of the two adjacent pairs of entries can be simplified by


eliminating the changing bit (z in both cases).

F (x,y,z) = x’y’ + xy

12
Note on Adjacency
● So far, we have assumed that adjacent cells in the
map need to touch each other but this is not always
the case.
● m0 and m2 are considered adjacent
● m0 + m2 = x’y’z’ + x’yz’ = x’z’(y’ + y) = x’z’
● m4 and m6 are considered adjacent
● m4 + m6 = xy’z’ + xyz’ = xz’(y’ + y) = xz’

13

Another Example
● The four adjacent squares can be combined to give
the single literal term z’

● The remaining single term is combined with the


adjacent square that was already used to give us the
term x’y’

F = z’ + x’y’

14

3-Variable Map Patterns


● The number of adjacent squares that may be
combined always represent a number that is a power
of 2 such as 1, 2, 4, and 8.
● One square represents one minterm with three literals.
● Two adjacent squares represents a term of two literals.
● Four adjacent squares represents a term of one literal.
● Eight adjacent squares represents the entire map and produces a
function that is always equal to 1.

15

4-Variable Map Patterns


● The number of adjacent squares that may be
combined always represent a number that is a power
of 2 such as 1, 2, 4, 8, and 16.
● One square represents one minterm with four literals.
● Two adjacent squares represents a term of three literals.
● Four adjacent squares represents a term of two literals.
● Eight adjacent squares represents a term of one literal.
● Sixteen adjacent squares represents the entire map and produces a
function that is always equal to 1.

16

Minimization Example

● The eight adjacent squares can be combined to form the


one literal term y.
● Four adjacent squares can be combined to form the two
literal term wz’.
● F = y + wz’
17
Another Example

• Four adjacent corners can be combined to form the two


literal term x’z’
• Four adjacent squares can be combined to form the
two literal term x’y
• The remaining 1 is combined with a single adjacent 1 to
obtain the three literal term w’y’z’
• F = x’z’ + x’y + w’y’z’
18
.

The End

19

You might also like