# Spring 2003 ENGR 212 Homework 2 Solution

Solutions are only given for interesting problems.

## Problem 1

For each of the three equations show below do the following actions:

• Draw the logic circuit diagram that directly implements the function. That is, OR and AND gates should match sum and product terms in the original equation.
• Construct the truth table.
• From the truth table, rewrite the equation in canonical sum-of-products (SOP) form, and then use shorthand SOP notation.
• From the truth table, rewrite the equation in canonical product-of-sums (POS) form, and then use shorthand POS notation.
• Draw the logic circuit diagrams for the Boolean expressions below using only two-input or three-input NAND gates.
1. f(a, b, c) = (a + b' + c')(a + c)
• Draw the logic circuit diagram that directly implements the function. That is, OR and AND gates should match sum and product terms in the original equation.

• Construct the truth table.  a b c (a + b' + c')(a + c) 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1
• From the truth table, rewrite the equation in canonical sum-of-products (SOP) form, and then use shorthand SOP notation.

f(a, b, c) = a' b' c + a b' c' + a b' c + a b c' + a b c
f(a, b, c) = Σ(1, 4, 5, 6, 7)

• From the truth table, rewrite the equation in canonical product-of-sums (POS) form, and then use shorthand POS notation.

f(a, b, c) = (a + b + c) (a + b' + c) (a + b' + c')
f(a, b, c) = Π(0, 2, 3)

• Draw the logic circuit diagrams for the Boolean expressions below using only two-input or three-input NAND gates.

There are many possible answers. This one is derived from the optimized SOP expression a + abc .

2. f(x, y, z) = (x(y + z'))'
• Draw the logic circuit diagram that directly implements the function. That is, OR and AND gates should match sum and product terms in the original equation.

• Construct the truth table.  x y z (x(y + z'))' 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 0
• From the truth table, rewrite the equation in canonical sum-of-products (SOP) form, and then use shorthand SOP notation.

f(x, y, z) = x' y' z' + x' y' z + x' y z' + x y' z' + x y' z
f(x, y, z) = Σ(0, 1, 2, 3, 5)

• From the truth table, rewrite the equation in canonical product-of-sums (POS) form, and then use shorthand POS notation.

f(x, y, z) = (x' + y + z) (x' + y' + z) (x' + y' + z')
f(x, y, z) = Π(4, 6, 7)

• Draw the logic circuit diagrams for the Boolean expressions below using only two-input or three-input NAND gates.

This one is derived from the original expression. The (y + z') is replaced by its equivalent, under de Morgan's theorem, (yz)' .

3. f(a, b, c) = (ab') + a c'
• Draw the logic circuit diagram that directly implements the function. That is, OR and AND gates should match sum and product terms in the original equation.

• Construct the truth table.  a b c (a ⊕ b') + a c' 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1
• From the truth table, rewrite the equation in canonical sum-of-products (SOP) form, and then use shorthand SOP notation.

f(a, b, c) = a' b' c' + a' b' c + a b' c' + a b c' + a b c
f(a, b, c) = Σ(0, 1, 4, 6, 7)

• From the truth table, rewrite the equation in canonical product-of-sums (POS) form, and then use shorthand POS notation.

f(a, b, c) = (a + b' + c) (a + b' + c') (a' + b + c')
f(a, b, c) = Π(2, 3, 5)

• Draw the logic circuit diagrams for the Boolean expressions below using only two-input or three-input NAND gates.

Here the exclusive-OR of (a ⊕ b') + a c' is expanded to give the SOP expression a b + ab' + a c' which is then implemented with NANDs.

Note: ⊕ is the "exclusive-OR" function.

## Problem 2

Do the following for the circuit drawn below:

• Derive the Boolean equation corresponding to the circuit. Do not simplify the expression! Sum and product terms should exactly match OR and AND gates in the circuit diagram.
• Simplify the Boolean equation using only switching algebra theorems. Show all of your simplification steps! Express the simplified equation in sum-of-product form.
• How many AND gates and OR gates are needed to implement your simplified expression?
• Derive the sum-of-product Boolean equation that produces the exact opposite (complement) of the circuit drawn below.

• Derive the Boolean equation corresponding to the circuit. Do not simplify the expression! Sum and product terms should exactly match OR and AND gates in the circuit diagram.

f(X, Y, Z) = (X' + X Y + X' Y' Z')' (X' Y' Z' + Z)

• Simplify the Boolean equation using only switching algebra theorems. Show all of your simplification steps! Express the simplified equation in sum-of-product form.  f(X, Y, Z) = (X' + X Y + X' Y' Z')' (X' Y' Z' + Z) f(X, Y, Z) = (X' + X' Y' Z' + X Y)' (X' Y' Z' + Z) Associativity f(X, Y, Z) = (X' + X Y)' (X' Y' Z' + Z) Absorption f(X, Y, Z) = (X' + Y)' (X' Y' Z' + Z) Absorption (form 2) f(X, Y, Z) = X Y' (X' Y' Z' + Z) de Morgan's f(X, Y, Z) = X Y' X' Y' Z' + X Y' Z Distributivity f(X, Y, Z) = 0 + X Y' Z Annihilation, Associativity, and Complementarity f(X, Y, Z) = X Y' Z Identify
• How many AND gates and OR gates are needed to implement your simplified expression?

One AND gate

• Derive the sum-of-product Boolean equation that produces the exact opposite (complement) of the circuit drawn below.

f'(X, Y, Z) = (X Y' Z)'
f'(X, Y, Z) = X' + Y + Z'

## Problem 3

A control panel for a rudimentary robot has three Control switches and one Power switch. Each switch has two positions -- ON or OFF. The control switches are labeled x , y, and z. The Power switch is labeled p. In order for the robot to be Enabled), the Power switch must be ON, and exactly two of the Control switches must ON. Design the logic circuit to generate the Enable signal. Show your results with a truth table, Boolean (algebraic) expression, and the logic circuit diagram.

## Problem 4

Simplify the following expressions using only boolean algebra. Show all your steps for credit.

1. F(x, y, z) = x + x' y + z
 F(x, y, z) = x + x' y + z F(x, y, z) = x + y + z Absorption (2nd form)
2. F(x, y, z) = x + y + x z + (x y z)'
 F(x, y, z) = x + y + x z + (x y z)' F(x, y, z) = x + y + x z + x' + y' + z' de Morgan's F(x, y, z) = x + x' + y + x z + y' + z' Associativity F(x, y, z) = 1 Complementarity and Annihilation
3. F(x, y, z) = (x + y)(x' + z)(y + z')
 F(x, y, z) = (x + y)(x' + z)(y + z') F(x, y, z) = (x x' + x z + y x' + y z)(y + z') Distributivity F(x, y, z) = (x z + y x' + y z)(y + z') Complementarity and Identity F(x, y, z) = x z y + y x' y + y z y + x z z' + y x' z' + y z z' Distributivity F(x, y, z) = x y z + x' y + y z + 0 + x' y z' + 0 Annihilation, Associativity, Complementarity, and Idempotency F(x, y, z) = x y z + x' y + y z + x' y z' Identity F(x, y, z) = (x y z + y z) + (x' y + x' y z') Associativity F(x, y, z) = y z + x' y Absorption
4. F(x, y, z) = ((((x + y)' + z)' + x)' + y')'
 F(x, y, z) = ((((x + y)' + z)' + x)' + y')' F(x, y, z) = (((x + y)' + z)' + x)'' y'' de Morgan's F(x, y, z) = (((x + y)' + z)' + x) y Involution F(x, y, z) = (((x + y)'' z') + x) y de Morgans' F(x, y, z) = ((x + y) z' + x) y Involution F(x, y, z) = (x z' + y z' + x) y Distributivity F(x, y, z) = (x + x z' + y z') y Associativity F(x, y, z) = (x + y z') y Absorption F(x, y, z) = x y + y z' y Distributivity F(x, y, z) = x y + y z' Associativity and Identity
5. F(x, y, z) = x (y + z(x + y z') + x' z') x'
 F(x, y, z) = x (y + z(x + y z') + x' z') x' F(x, y, z) = x x' (y + z(x + y z') + x' z') Associativity F(x, y, z) = 0 (y + z(x + y z') + x' z') Complementarity F(x, y, z) = 0 Annihilation
6. F(x, y, z) = x + x' z + x' z'
 F(x, y, z) = x + x' z + x' z' F(x, y, z) = x + x' (z + z') Associativity F(x, y, z) = x + x' 1 Complementarity F(x, y, z) = x + x' Identity F(x, y, z) = 0 Complementarity