Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Using Karnaugh Maps for Boolean Function Minimization - Prof. Pascal Hentenryck, Study notes of Computer Science

A lecture note from cs031 course on digital logic design. It introduces karnaugh maps as a manual and heuristic method to minimize the size of boolean circuits. How to draw and fill the karnaugh map with the truth table, cover 1s with boxes, and generate products for each box to obtain the minimal sum of products expression. The document also covers the concept of don't cares and their usage in simplifying boolean functions.

Typology: Study notes

Pre 2010

Uploaded on 08/18/2009

koofers-user-iaf
koofers-user-iaf 🇺🇸

4.3

(2)

10 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture 3 (b) Page 1
CS031
CS31
Pascal Van Hentenryck
Karnaugh Maps
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Using Karnaugh Maps for Boolean Function Minimization - Prof. Pascal Hentenryck and more Study notes Computer Science in PDF only on Docsity!

CS031 Lecture 3 (b) (^) Page 1

CS

Pascal Van Hentenryck Karnaugh Maps

Overview

Karnaugh Maps

  • Simplifying Boolean functions

Abstraction Hierarchy

Programming Language Assembly Language Machine Language Sequential Circuit Combinational Circuit Binary Value Voltage Programming Language Assembly Language Machine Language Sequential Circuit Combinational Circuit Binary Value Voltage

Minimizing Boolean Functions

The problem

  • Given a truth table, find a small circuit to compute it
  • The problem is very hard in general (no really efficient algorithm exists)

Possible solutions

  • Put the function as a sum of products and build the corresponding circuit
  • Put the function as product of sums and build the corresponding circuit

Limitation

  • The size of the circuit may be far from the minimal size

Karnaugh Maps

  • A manual and heuristic method to minimize the size of the circuit

Karnaugh Map

3 variables

4 variables

Karnaugh Maps

Property

  • Adjacent entries differ by at most one variable
  • The whole table is wrapping up on itself. The end of a row is adjacent to the beginning of the row and so on.

Minimization

The basic strategy

  1. Draw the Karnaugh map
  2. Fill it with the truth table
  3. Cover all the 1s with boxes of size 1, 2, 4, 8,
    1. ... (an entry can be covered by several boxes if needed)
  4. Generate a product for each box; each element of the product corresponds to a variable which stays constant over the box. It is the variable if the variable stays at 1 and the negation of the variable otherwise.
  5. The result is the sum of all these products The main goal
  • As few boxes as possible
  • The biggest possible boxes

A simplification

Another Presentation of a Truth Table The Karnaugh map looks like this What is the boolean function?

Another Simplification Problem

Sum of Products gives us:

Another Simplification Problem

Sum of Products gives us:

f(x,y,z) = x’yz + xy’z’ + xyz’ + xyz

Karnaugh map:

A Really Big One

Don’t Cares

Sometimes, it doesn’t matter exactly

which output is generated in a certain

situation.

A don’t care value is represented by a

x and we can choose any value that

is convenient to us.

What do we choose?

By setting the left and right x’s to 1 we can make a 2x2 square, reducing the function to: f(x,y,z)=z’

We Still Don’t Care!

What if the x’s were 0’s? f(w,x,y,z)=(w’x’y) + (w’xz) + (xyz)

We Still Don’t Care!

What if the x’s were 0’s?

f(w,x,y,z)=(w’x’y) + (w’xz) + (xyz)

What if they’re don’t cares?