Designing a Circuit for a Given Input/Output Table
Design a circuit for the following input/output table:

Inputs

Outputs

P

Q

R

S

1

1

1

0

1

1

0

1

1

0

1

0

1

0

0

0

0

1

1

0

0

1

0

0

0

0

1

0

0

0

0

1

First we construct a Boolean expression with this table as its truth table using disjunctive normal form. Rows 2 and 8 are the only rows with output.
Row 2 gives us P
Ù Q Ù Ø R.
Row 8 gives us
Ø P Ù Ø Q Ù Ø R.
Combining these results in disjunctive normal form: (P
Ù Q Ù Ø R) Ú (Ø P Ù Ø Q Ù Ø R).
Now draw this circuit:

 

 

 

 

 

 

 

Equivalently, application of the distributive law gives us: Ø R Ù ((P Ù Q ) Ú (Ø P Ù Ø Q))

 

 

 

An equivalent circuit requiring one less gate.

Designing a Full Adder 

Example

Showing two circuits are equivalent

Using basic Boolean algebra properties (Theorem 1) one can simplify the Boolean expression for a circuit. This new, logically equivalent Boolean expression can then be used to construct a simpler circuit. Another technique to finding a simpler circuit is to find an equivalent circuit that uses fewer gates. Trial and error, intuition and insight are valid tools when pursuing this latter method.