## Exercises5.6Exercises

###### 1.

Design a function that will detect the even 4-bit integers.

Solution

Let a 4-bit integer be $wxyz$ where each literal represents one bit. The even 4-bit integers are given by the function:

\begin{alignat*}{1} F(w,x,y,z) \amp {}={} w' \cdot x' \cdot y' \cdot z' + w' \cdot x' \cdot y \cdot z' + w' \cdot x \cdot y' \cdot z' + w' \cdot x \cdot y \cdot z' \\ \amp \quad + w \cdot x' \cdot y' \cdot z' + w \cdot x' \cdot y \cdot z' + w \cdot x \cdot y' \cdot z' + w \cdot x \cdot y \cdot z' \end{alignat*}

Using the distributive property repeatedly we get:

\begin{alignat*}{1} F(w,x,y,z) \amp {}={} z' \cdot (w' \cdot x' \cdot y' + w' \cdot x' \cdot y + w' \cdot x \cdot y' + w' \cdot x \cdot y \\ \amp \quad + w \cdot x' \cdot y' + w \cdot x' \cdot y + w \cdot x \cdot y' + w \cdot x \cdot y) \\ \amp {}={} z' \cdot (w' \cdot (x' \cdot y' + x' \cdot y + x \cdot y' + x \cdot y) \\ \amp \quad + w \cdot (x' \cdot y' + x' \cdot y + x \cdot y' + x \cdot y)) \\ \amp {}={} z' \cdot (w' + w) \cdot (x' \cdot y' + x' \cdot y + x \cdot y' + x \cdot y) \\ \amp {}={} z' \cdot (w'+ w) \cdot (x' \cdot (y' + y) + x \cdot (y' + y)) \\ \amp {}={} z' \cdot (w' + w) \cdot (x' + x) \cdot (y' + y) \end{alignat*}

And from the complement property we arrive at a minimal sum of products:

\begin{gather*} F(w,x,y,z) = z' \end{gather*}

which you recognize as Figure 5.1.3.

###### 2.

Find a minimal sum of products (mSoP) expression for the function

\begin{align*} F(x,y,z) &= x' \cdot y' \cdot z' + x' \cdot y' \cdot z + x' \cdot y \cdot z'\\ &\quad+\ x \cdot y' \cdot z' + x \cdot y \cdot z' + x \cdot y \cdot z \end{align*}
Solution

First we draw the Karnaugh map: Several groupings are possible. Keep in mind that groupings can wrap around. We will work with: which yields a minimal sum of products:

\begin{equation*} F(x,y,z) = z' + x' \cdot y' + x \cdot y \end{equation*}
###### 3.

Find a minimal product of sums (mPoS) expression for the function

\begin{align*} F(x,y,z) &= (x + y + z) \cdot (x + y + z') \cdot (x + y' + z')\\ &\quad \cdot \ (x' + y + z) \cdot (x' + y' + z') \end{align*}
Solution

This expression includes maxterms 0, 1, 3, 4, and 7. These appear in a Karnaugh map: Next we encircle the largest adjacent blocks, where the number of cells in each block is a power of two. Notice that maxterm $M_{0}$ appears in two groups. From this Karnaugh map it is very easy to write the function as a minimal product of sums:

\begin{equation*} F(x,y,z) = (x + y) \cdot (y + z) \cdot (y' + z') \end{equation*}
###### 4.

Find a minimal product of sums (mPoS) expression for the function

\begin{align*} F(x,y,z) &= x' \cdot y' \cdot z' + x' \cdot y' \cdot z + x' \cdot y \cdot z'\\ &\quad+\ x \cdot y' \cdot z' + x \cdot y \cdot z' + x \cdot y \cdot z \end{align*}
Solution

Using the Karnaugh map zeros: we obtain the complement of our desired function:

\begin{equation*} F'(x,y,z) = x' \cdot y \cdot z + x \cdot y' \cdot z \end{equation*}

and from DeMorgan's Law:

\begin{equation*} F(x,y,z) = (x + y' + z') \cdot (x' + y + z') \end{equation*}
###### 5.

Show where each minterm is located with this Karnaugh map axis labeling using the notation of Figure 5.5.7.  ###### 6.

Show where each minterm is located with this Karnaugh map axis labeling using the notation of Figure 5.5.7.  ###### 7.

Design a logic function that detects the prime single-digit numbers. Assume that the numbers are coded in 4-bit BCD (see Section 4.6.1). The function is $1$ for each prime number.

Solution

The prime numbers correspond to the minterms $m_{2}\text{,}$ $m_{3}\text{,}$ $m_{5}\text{,}$ and $m_{7}\text{.}$ The minterms $m_{10}\text{,}$ $m_{11}\text{,}$ $m_{12}\text{,}$ $m_{13}\text{,}$ $m_{14}\text{,}$ $m_{15}$ cannot occur so are marked “don't care” on the Karnaugh map. which gives:

\begin{equation*} F(w,x,y,z) = x \cdot z + x' \cdot y \end{equation*}