# Simplify boolean expression online

There are two serious limitations to using Boolean algebra though: There is no algorithm you can follow that is guaranteed to lead to the simplest form of the expression Given any intermediate result there is no way to tell if it is in fact the simplest form of the expression In this lecture you will learn an algorithmic procedure for finding the simplest two level form of a Boolean expression.

This method doesn't give you the simplest form in any number of levels. However, the simplest two level form is usually what we want because as you add more levels the expression may get smaller but the propagational delay will also increase.

Propagational delay determines the speed of the circuit. Two Level Form of a Boolean Expression. The two level form of an expression refers to the number of subexpressions in the Boolean equation or the number of gates in the longest path through the gate implementation of the expression.

Inverter gates don't count as a separate level. Motivation In essence the method we are simplify boolean expression online to discuss is a pictorial way to apply the distributive law to factor out common subexpressions.

Intuitively, if you can find two terms that are equivalent except that one variable is the complement of the matching variable in the other term you can factor out this variable. The second example above shows that it works for multiple variable subsets--as long as they are powers of two. The two examples above make it look easy to remove subexpressions with Boolean algebra. For small examples it is easy. For larger expressions with 3 and more variables it because much harder. In this **simplify boolean expression online** we will study a method called Karnaugh simplify boolean expression online you can use to quickly find the minimum standard form of a Boolean function of 4 or fewer variables.

Later we will study an algorithmic method that works for functions of any number of variables. The karnaugh, or k-map, method is fast and best carried out by a human. The algorithm we will study later is tedious for humans but is easy to program using any high-level programming language. A K-map shows the value of a function for every combination of input values just like a truth table, but a K-map spatially arranges the values so it is easy to find common terms that can be factored out.

The image below shows the form of a 2,3 and 4 variable K-map. Notice how the columns are numbered on the 3 variable K-map and how both the rows and columns are numbered on the 4 variable K-map 00 01 11 This numbering guarantees that adjacent terms differ by only one term. For example, in the 3 variable K-map above the square with a 2 in it represents the minterm A'BC' and the square with a 6 in it represents the minterm ABC'. If both of these terms appear simplify boolean expression online minterms in an expression we simplify boolean expression online factor out the A: Also notice that entries at simplify boolean expression online ends of the K-map differ by only one element with entries on the other side of the K-map.

Since this is a function of 3 variables we first draw the outline for a 3-variable K-map. Since the function is given in terms of minterms we write the minterm number inside the box that represents that minterm. Next we put a 1 in each square where the function has the value 1. Finally, we circle groups of 1's simplify boolean expression online that all 1's are circled. We circle only groups that are powers of 2 and try to create circles as large as possible.

The example above gives the general idea. What follows is a more formal description of how to proceed. The first step to understanding the formal procedure is understanding some terms. Implicant - a single minterm or group of minterms that can be combined together on the K-map.

Prime Implicant - Implicant that can not be combined with another one to remove a literal. Each product term in the minimum sum of products expression is a prime implicant. Essential Prime Implicant - A prime imlpicant that includes a minterm not covered by any other prime implicant. Note, that with the example above if you're not careful you could end up with simplify boolean expression online expression with too many prime implicants.

For example, if you choose A'B first you would then have to choose A'C' and BC to cover every implicant in the on-set. This observation is the motivation for the formal K-map procedure that follows. Draw the K-map and put a 1 in each square that corresponds to a minterm of the function. You can simplify boolean expression online the K-map from a truth table, Boolean expression, etc.

Simplify boolean expression online the prime implicants. To do this find the largest adjacent groups of 1's. Groups must be "square" and the number of 1's in a group must be a power of 2. Find the essential prime implicants. An essential prime implicant is a prime implicant that includes a 1 not covered by any other prime implicants. Write down the minimized expression.

First write down all essential prime implicants. If there are any 1's not covered by prime implicants, carefully select prime implicants to cover the remaining 1's. Note, you may have to try several selections to find the minimal form of the expression. Use a K-map to simplify the following Boolean function: Sometimes the output of a function for a specific input value is "don't care". Don't cares act like joker in a deck of playing cards--we can make them whatever we want. When you are simplifying a function using a K-map these don't care values help you to form larger groups of 1's which simplify boolean expression online you smaller prime implicants.

You already know one method for simplifying Boolean expressions: Two Level Form of a Boolean Expression The two level form of an expression refers to the number of subexpressions in the Boolean equation or the number of gates in the longest path simplify boolean expression online the gate implementation of the expression. The numbers inside of the boxes above refer to the corresponding row in the truth **simplify boolean expression online** for a function of the same number of variables.

You may want to use the truth table to the right to compare K-map entries and truth table entries.