K-Map Analysis and Boolean Function Simplification, Exercises of Logic

Examples of K-Map analysis and Boolean function simplification using sum of products and product of sums methods. It includes various Boolean functions with their corresponding truth tables and K-Map representations. The document also covers the concept of don't care conditions and their application in simplifying Boolean functions.

Typology: Exercises

2021/2022

Uploaded on 08/05/2022

aichlinn
aichlinn 🇮🇪

4.4

(46)

1.9K documents

1 / 22

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
81
Simplification of Boolean Functions
Another method of simplification of Boolean function is Karnaugh Map (K-Map). This map is a
diagram made of squares, each square represent one minterms, and there are several types of K-
|Map depending on the number of variables in Boolean function.
1-Two variable K-Map
2 Three variable K Map
3 Four variable K-Map
X Y
X Y
X Y
X Y
M1
M0
M3
M2
X Y Z
X Y Z
X Y Z
X Y Z
XY Z
X Y Z
M2
M3
M1
M0
M6
M7
M5
M4
2
8
0
6
5
4
14
13
12
10
9
8
X
Y Z
0 0 01 11 10
0
8
Y
X
0 1
Y
X
0 1
0
1
X
Y Z
0 0 01 11 10
0
8
XY
ZW
0 0 01 11 10
00
08
88
80
XY
ZW
0 0 01 11 10
00
08
88
80
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download K-Map Analysis and Boolean Function Simplification and more Exercises Logic in PDF only on Docsity!

Simplification of Boolean Functions

Another method of simplification of Boolean function is Karnaugh – Map (K-Map). This map is a diagram made of squares, each square represent one minterms, and there are several types of K- |Map depending on the number of variables in Boolean function.

1-Two – variable K-Map

2 – Three – variable K – Map

3 – Four – variable K-Map

X Y X Y

X Y X Y

M0 M

M2 M

X Y Z X Y Z X Y Z X Y Z

X Y Z XY Z X Y Z X Y Z

M0 M1 M3 M

M4 M5 M7 M

X

Y Z 0 0 01 11 10 0 8

Y

X

Y 0 1

X

X

Y Z 0 0 01 11 10 0

8

XY

ZW 0 0 01 11 10 00 08 88 80

XY

ZW 0 0 01 11 10

00 08 88 80

3Five and Six variables K-Map

AB

CDE

ABC

DEF

= A B C + A B C + A B C + A B C + A B C

F = C + A B

4 - F ( X,Y,Z ) = ∑ ( 0, 2, 4 , 5 , 6 )

F ( X,Y,Z ) = Z + X Y

5 – F ( X,Y,Z,W ) = ∑ ( 0, 1, 2, 4, 5, 6, 8 , 9 , 12, 13, 14 )

F ( X,Y,Z,W ) = Z + X W + Y W

X

YZ 0 0 01 11 10 0 8

XY

ZW 0 0 01 11 10

00 08 88 80

A

BC 0 0 01 11 10

0 8

6 - F = A B C + B C D + A B C D + A B C

F ( A,B,C,D ) = B D + B C + A C D

7 – F(A,B,C,D.E) = ∑ (0,2,4,6,9,11,13,15,,17,21,25,27,29,31)

F( A,B,C,D) = A B E + B E + A D E

H.W

Simplify the following functions in sum of product using K-map

1- F = X Y + X Y W + W ( X Y + X Y )

2 – F = A B D + A C D + A B + A C D + A B D

3 – F ( A, B , C, D ) = Π ( 2, 3, 6, 7, 8, 9, 10 , 11, 12, 13, 14 )

AB

CD 0 0 01 11 10 00 08 88 80

AB

CDE

2 – Product of Sums In this case the missing terms is represented by 0 in K-map and simplified to obtained F (complement of the function).

F = A B + C D + B D

And the basic function F = ( A + B ) ( C + D ) ( B + D )

Ex Simplify the function F in 1 – Sum of Products 2 – Product of Sums

X Y Z 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 0

AB

CD 0 0 01 11 10

00 08 88 80

Note If the function in Product of Sums form then the complement of the function must take first and then the 0 is represented in k-map.

Ex: ( A + B + C ) ( B + D ) The function in Product of Sum form, therefore the complement is take first F = A B C + B D Then these minterms will be assign in the map by 0 because the function is complement.

Ex : Obtained the simplified expression in Product of Sums

F = ( A + B + D ) ( A + D ) ( A + B + D ) ( A + B + C + D )

Sol F = A B D + A D + A B D + A B C D

F = A B + B D + B C D

F = ( A + B ) ( B + D ) ( B + C + D )

AB

CD 0 0 01 11 10

00 08 88 80

Ex simplify the Boolean function F in 1 – Sum of Products 2 – Product of Sums F ( X,Y,Z,W) = Σ (1, 3, 7, 11, 15 ) d ( X,Y,Z,W ) = Σ ( 0, 2 , 5 )

Sol 1- Sum of Products 2 – Product of Sums

F ( X,Y,Z,W) = Z W + X Y F ( X,Y,Z,W) = W + X Z

F ( X,Y,Z,W) = W ( X + Z )

Ex Simplify the Boolean function F in 1 – Sum of Products 2 Product of Sums using don’t care condition F = A C E + A C D E + A C D E D = D E + A D E + A D E

Sol F = A C E .1 + A C D E + A C D E = A C D E + A C D E + A C D E + A C D E

D = D E ( A + A ) + A D E ( C + C ) + A D E ( C + C )

= A D E ( C + C ) + A D E ( C + C ) + A C D E + A C D E + A C D E

  • A C D E

= A C D E + A C D E + A C D E + A C D E + A C D E + A C D E +A C D E

  • A C D E

X 8 8 X

X 8

X X

0 X 0

AB

CD 0 0 01 11 10

00 08 88 80

AB

CD 0 0 01 11 10

00 08 88 80

1 – Sum of Products 2 – Product of Sums

S.O.P P.O.S.

F ( A,C,D,E ) = A C + C E + A C D F ( A,C,D,E ) = A C + C D + A C D

F ( A,C,D,E ) = (A + C ) (C + D ) ( A + C + D )

Ex Simplify the Boolean function F in Sum of Products using don’t care condition F = B C D + B C D + A B C D D = B C D + A B C D

X 8 X

8 X X

X 88 X

X^ X

0 X X

X 0 X

X X

X^00 X

AC

DE 0 0 01 11 10

00 08 88 80

AC

DE 0 0 01 11 10

00 08 88 80

The Block Diagram Logic Circuit

2 – Full Adder A full adder is a combinational circuit that forms the arithmetic sum of three inputs bits. It consists of three inputs and two outputs. Two of the inputs variables, X and Y, represent the two bits to be added, the third input Z , represent the carry from the previous step. The two output S (for sum) and C ( for carry ).

Input Output X Y Z C S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 Block Diagram 1 1 1 1 1

Truth Table To find the logic equations K- map is used

S = X Y Z + X Y Z + X Y Z + X Y Z = = Z ( X Y + X Y ) + Z ( X Y + X Y ) = = Z ( X. Y ) + Z ( X Y ) = = Z ( X Y ) + Z ( X Y ) = X Y Z

X H. A.

Y

S C

S C

X Y F. A.

Z

X Y

S

C

X

YZ 0 0 01 11 10 0 1

C = X Y + X Z + Y Z

The logic curcuit

The Subtractors

1 – Half Subtractor A half subtractor is combinational circuits that subtract two bits and produce their differences. To perform (X-Y ) the truth table is: Input output X Y B D 0 0 0 0 0 1 1 1 D = difference , B = Borrow 1 0 0 1 1 1 0 0

Truth Table

X

YZ 0 0 01 11 10 0 8

S

C

X Y Z

D = X Y Z + X Y Z + X Y Z + X Y Z

= Z ( X Y + X Y ) + Z ( X Y + X Y )

= Z ( X Y ) + Z ( X Y )

= Z ( X Y ) + Z ( X Y )

= X Y Z

The logic curuit

X

YZ 0 0 01 11 10 0 8

S

C

X Y Z

Code Conversion

To convert from binary code to another code, a combinational circuit performs this transformation by means of logic gates. Ex Design a combinational circuit that convert a BCD code to Excess-3 code.

Sol The truth table consists of 4 inputs and 4 outputs

Input Output A B C D X Y Z W 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 0 X = A + B D + B C 1 0 0 0 1 0 1 1 = A + B ( D + C ) 1 0 0 1 1 1 0 0 1 0 1 0 x x x x 1 0 1 1 x x x x 1 1 0 0 x x x x 1 1 0 1 x x x x 1 1 1 0 x x x x 1 1 1 1 x x x x

Y = B C D + B D + B + C

= B C D + B ( D + C )

X X

8 1 X

X X X X

X X

AB

CD 0 0 01 11 10 00 08 88 80

AB

CD 0 0 01 11 10 00 08 88 80

Ex A combinational circuit has four inputs and one output, the output equal 1 when: 1 – all the inputs are equal to 1 or 2 – non of the inputs are equal to 1 or 3 – an odd number of inputs are equal to 1. Design the logic circuit.

Sol

Input Output X Y Z W F 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 F = Y Z W + X Y W + X Y Z + X Z W 1 0 0 1 0 1 0 1 0 0 + Y Z W + X Y W + X Y Z + Y Z W 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

XY

ZW 0 0 01 11 10 00 08 88 80

Ex Design a combinational circuit that inputs is three – bit numbers and the output is equal to the squared of the input numbers in binary?

Sol Input Output X Y Z F 5 F 4 F 3 F 2 F 1 F 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 0 1 F 0 = Z 1 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 0 1

F 3 = X Y Z + X Y Z

F 5 = X Y

X

YZ 0 0 01 11 10 0

X^8

YZ 0 0 01 11 10 0 8

X

YZ 0 0 01 11 10 0 8 X

YZ 0 0 01 11 10 0 8

F 4 = X Y + X Z

F 2 = Y Z

X

YZ 0 0 01 11 10 0 8