Discover Boolean Equations

In some cases we can create a Truth Table based on the known input and output for a function. From this we need to derive the Boolean formula. This method can also be used occasionally to simplify Boolean expressions. Start with the simplest case - where there is only one output value:

EXAMPLE:

A
B
OUTPUT
F
F
F
F
T
F
T
F
T
T
T
F

SOLUTION:

Create a Boolean expression that is True (1) for the given input and False (0) for all other cases.

We know that:

• The AND operation produces a True result in only one case - when all its input is True.
• The NOT operator converts False (0) into True (1).

THUS -
• where the input is True use that Boolean variable "as is",
• where the input is False use the NOT of the input variable to produce True,
• and then AND the all terms together.

In the above case (line 3):

A = T, B = F

so we derive:

(A AND NOT B)

(A · ~B)

Check:

A
B
~B
A · ~B
F
F
T
F
F
T
F
F
T
F
T
T
T
T
F
F

CONDITION 1:

In fact we can easily see that if we have ANY number of "input" variables, we can write a Boolean expression that will produce T or 1 (True) in exactly one case when:

1. We write an expression "ANDing" all the variables together, and
2. Negating each variable when the value associated with that variable is F or 0.

EXAMPLES:

• When P = 1, Q = 0, R = 1, S = 1
then the expression (P && ~Q && R && S) = (1 && ~0 && 1 && 1) is True;

• When F = 1, G = 1, H = 0, J = 0
then the expression (F && G && ~H && ~J) = (1 && 1 && ~0 && ~0) is True;

• When W = 0, X = 0, Y = 0, Z = 0
then the expression (~W && ~X && ~Y && ~Z) = (~0 && ~0 && ~0 && ~0) is True.

CONDITION 2:

If we have a number of variables and want to produce a Boolean expression whenever any one of them is T or 1 (true), then "ORing" them all together will produce T (or 1) if any one of the expressions is true.

EXAMPLES:

• When P = 1, Q = 0, R = 1, S = 1
then the expression (P || Q || R || S) = (1 || 0 || 1 || 1) is True;

• When F = 1, G = 1, H = 0, J = 0
then the expression (F || G || H || J) = (1 || 1 || 0 || 0) is True;

• When W = 0, X = 0, Y = 0, Z = 0
then the expression (W || X || Y || Z) = (0 || 0 || 0 || 0) is False.

# SO:

Given a Truth Table,

1. Write an AND Expression as above for each row that has T or 1 as the expected output (this expression will be true if and only if the conditions of that row are met); and

2. Write an OR expression combining each of the row expressions.

The resulting expression then represents the complete functionality of the Truth Table.

CS1104 Main Page
Last Updated 2001/02/15
© L.Heath, 2000, updated by J.A.N. Lee.