QUESTION IMAGE
Question
2:
implement truth table in table 1 using only nand gates. (hint: use the circuit in figure 2.23a in the book 1 as a starting point.) (points: 5)
egr 21204 spring 2026 assignment 2
table 1: truth table for three - way light control (p2)
\
3:
Step1: Write sum-of-minterms for $f$
From the truth table, identify rows where $f=1$: $m_1, m_2, m_4, m_7$.
$f(x_1,x_2,x_3) = \bar{x_1}\bar{x_2}x_3 + \bar{x_1}x_2\bar{x_3} + x_1\bar{x_2}\bar{x_3} + x_1x_2x_3$
Step2: Convert to NAND-only form
Use De Morgan's law: $A+B = \overline{\overline{A}\cdot\overline{B}}$, and $A = \overline{\overline{A}}$. First rewrite $f$ as:
Apply De Morgan's to the inner negation:
Step3: Express each term as NAND
Each $\overline{ABC} = \text{NAND}(A,B,C)$, and single variables: $\bar{x} = \text{NAND}(x,x)$. Substitute:
- $\overline{\bar{x_1}\bar{x_2}x_3} = \text{NAND}(\text{NAND}(x_1,x_1), \text{NAND}(x_2,x_2), x_3)$
- $\overline{\bar{x_1}x_2\bar{x_3}} = \text{NAND}(\text{NAND}(x_1,x_1), x_2, \text{NAND}(x_3,x_3))$
- $\overline{x_1\bar{x_2}\bar{x_3}} = \text{NAND}(x_1, \text{NAND}(x_2,x_2), \text{NAND}(x_3,x_3))$
- $\overline{x_1x_2x_3} = \text{NAND}(x_1,x_2,x_3)$
Step4: Final NAND circuit
The final circuit is a 4-input NAND gate, where each input is the output of a 3-input NAND gate (with inverted variables implemented as 2-input NAND gates on single variables).
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The function implemented with only NAND gates is constructed as:
- First, create inverted inputs: $\bar{x_1} = \text{NAND}(x_1,x_1)$, $\bar{x_2} = \text{NAND}(x_2,x_2)$, $\bar{x_3} = \text{NAND}(x_3,x_3)$
- Build 3-input NAND gates for each minterm's negation:
- $G_1 = \text{NAND}(\bar{x_1},\bar{x_2},x_3)$
- $G_2 = \text{NAND}(\bar{x_1},x_2,\bar{x_3})$
- $G_3 = \text{NAND}(x_1,\bar{x_2},\bar{x_3})$
- $G_4 = \text{NAND}(x_1,x_2,x_3)$
- Connect $G_1, G_2, G_3, G_4$ to a 4-input NAND gate: $f = \text{NAND}(G_1,G_2,G_3,G_4)$
The logical expression in NAND form is: