Skip to content

3. Minimization and K-Maps

So, why do we need to minimize our circuits? Well, they are costly, VERY COSTLY. So, MINIMIZE. It also improves speed, smaller chance of defects, etc.

Minimization

Use boolean algebra rules to help minimization.

alt text

And here's some examples.

alt text

Let's consider the one-bit full adder. How do we minimize that?

$C_{out}=\bar{A}BC_{in}+A\bar{B}C_{in}+AB\bar{C_{in}}+ABC_{in}$

$=AB(\bar{C}+C)+A\bar{B}C+\bar{A}BC$

$=AB+A\bar{B}C+\bar{A}BC$

Wait, what now? Well, lets add a term!

$=AB+A\bar{B}C+ABC+\bar{A}BC+ABC$

$=AB+AC(\bar{B}+B)+BC(\bar{A}+A)$

$=AB+AC+BC$

So that's a little weird, let's use another tool that is easier.

Karnaugh Maps

Gray code is a way of encoding binary by only changing one bit on each step.

alt text

Using this gray code, we can convert it to a K-map to minimize binary.

alt text

Then, find rectangles of 1s (or Xs but you do not need to include Xs, they are optional). of heights and widths of 1, 2, or 4. Overlapping is fine. Use the biggest retangles possible and the fewest rectangels as possible.

alt text

Then for each rectangle, look at the values of the variables along the axes. some variables change, and others don't.Each rectangle is an AND minterm. Write the variables that stay the same for that rect (keeping the NOT bars). Ignore the variables that change. OR all the terms together.

alt text

A K-map with more than 2 variables.

alt text

The K-map wraps around, left-right and top-bottom. Think of it like a donut.

alt text

Next Page →