02 Introduction to Logic Circuits

This is the foundational chapter of the book. It introduces logic variables, truth tables, and the three fundamental operations: AND, OR, and NOT. The chapter shows how to build logic networks from gates, covers Boolean algebra and all its key theorems (commutative, associative, distributive, DeMorgan's, absorption), and introduces the Venn diagram as a visualization tool. Synthesis techniques are presented for sum-of-products (SOP) and product-of-sums (POS) canonical forms, along with NAND-only and NOR-only implementations. Karnaugh maps are introduced for manual minimization of logic functions up to 5 variables, including don't-care conditions and multiple-output circuits. The chapter also gives a first introduction to Verilog HDL with structural, behavioral, and hierarchical coding styles.

AND / OR / NOT Truth Tables Boolean Algebra DeMorgan's Theorem SOP & POS Forms NAND / NOR Logic Karnaugh Maps Don't-Care Conditions Verilog Intro
How to read POS off a K-map (group the 0-cells)

The standard SOP procedure groups 1-cells on a K-map and writes a product term per group. To get POS (product-of-sums) instead, do the same thing but on the 0-cells — and flip the literal polarity rule:

  1. Plot the K-map.
  2. Group the 0-cells in powers of 2 (1, 2, 4, 8…), maximally large; allow edge-wrap.
  3. For each group, write a sum (OR) term using the variables that stay constant within the group:
    • variable that is constantly 1complemented literal
    • variable that is constantly 0 → uncomplemented literal
    (Polarity flipped vs. SOP — this is the only thing that changes.)
  4. AND all the sum terms together.

Why polarities flip: a 0-cell corresponds to a maxterm, which is true for all input combinations except its own. A maxterm is the OR of complemented-where-1, uncomplemented-where-0 literals — the polarity opposite of a minterm. Grouping adjacent 0-cells lets some literals cancel, exactly as grouping adjacent 1-cells does for SOP.

What a valid group of 0-cells looks like

Groups must be powers of 2 (1, 2, 4, 8, …) and rectangular on the K-map. A larger group cancels more literals, producing a simpler sum term. Three examples on a 4-variable K-map:

Pair — 2 cells, cancels 1 variable, leaves 3 literals.

x₃x₄00011110x₁x₂00011110m00m10m31m21m41m51m71m61m121m131m151m141m81m91m111m101Pair (3 literals): x₁ + x₂ + x₃

Across the pair: $x_1=0, x_2=0, x_3=0$ stay constant; $x_4$ flips and cancels. Polarity flip: constant-0 stays uncomplemented → sum term $x_1 + x_2 + x_3$.

Quad — 2×2 block of 4 cells, cancels 2 variables, leaves 2 literals.

x₃x₄00011110x₁x₂00011110m01m10m30m21m41m50m70m61m121m131m151m141m81m91m111m101Quad (2 literals): x₁ + x̄₄

Constants: $x_1=0$ (both rows), $x_4=1$ (both columns); $x_2, x_3$ flip and cancel. Polarity flip: $x_1=0$ → $x_1$; $x_4=1$ → $\overline{x_4}$ → sum term $x_1 + \overline{x_4}$.

Octet — 2×4 block of 8 cells, cancels 3 variables, leaves 1 literal.

x₃x₄00011110x₁x₂00011110m00m10m30m20m40m50m70m60m121m131m151m141m81m91m111m101Octet (1 literal): x₁

Only $x_1=0$ stays constant; $x_2, x_3, x_4$ all flip across the 8 cells. Sum term: $x_1$.

Summary — bigger groups, fewer literals:

Group size $k$Variables canceledLiterals in sum term (4-var map)
1 (single)04
2 (pair)13
4 (quad)22
8 (octet)31

Always group the largest legal block of 0-cells you can — each doubling of group size halves the number of remaining literals.

Worked example — 3 variables

$f(A, B, C) = \sum m(0,1,2,5,6,7)$ — zeros at $m_3$ and $m_4$.

K-map (red cells = 0, the ones we group for POS):

BC 00 01 11 10 A 0 1 1 1 0 m₃ 1 0 m₄ 1 1 1 0 1 3 2 4 5 7 6

Both 0-cells are isolated (no adjacent 0), so two single-cell groups. Convert each to a sum term:

GroupABCSum term
m₃011$A + \overline{B} + \overline{C}$
m₄100$\overline{A} + B + C$

$f = (A + \overline{B} + \overline{C})(\overline{A} + B + C)$

SOP vs POS at a glance

SOPPOS
Group cells with value10
Each group becomesa product (AND) terma sum (OR) term
Constant 1 in group → literal isuncomplementedcomplemented
Constant 0 in group → literal iscomplementeduncomplemented
Combine groups withORAND
Cheapest when there are fewer1-cells0-cells

Rule of thumb: count the 1s and 0s on the K-map. Whichever is fewer, group those — fewer cells means fewer / smaller groups, which means a cheaper expression. SOP and POS are the two complementary readings of the same map.

Key Formulas — Boolean Algebra & Logic

DeMorgan's Theorem 1 A · B = A + B
DeMorgan's Theorem 2 A + B = A · B
Absorption x + x · y = x
Distributive x · ( y + z ) = x·y + x·z
Identity x + 0 = x , x · 1 = x
Complement x + x = 1 , x · x = 0
Idempotent x + x = x , x · x = x
Involution x = x
Consensus  ★ Important xy + xz + yz = xy + xz

NAND / NOR Universal-Gate Cheat Sheet

Both NAND and NOR are functionally complete — each can build NOT, AND, and OR by itself. Memorize these six recipes; every other gate (XOR, MUX, latch, …) follows by composition.

Function NAND-only construction NOR-only construction
NOT $\overline{x}$ $\mathrm{NAND}(x,\, x)$  — 1 gate $\mathrm{NOR}(x,\, x)$  — 1 gate
AND $x \cdot y$ $\mathrm{NAND}(\mathrm{NAND}(x,y),\, \mathrm{NAND}(x,y))$  — 2 gates (NAND + inverter) $\mathrm{NOR}(\mathrm{NOR}(x,x),\, \mathrm{NOR}(y,y))$  — 3 gates (invert + invert + NOR)
OR $x + y$ $\mathrm{NAND}(\mathrm{NAND}(x,x),\, \mathrm{NAND}(y,y))$  — 3 gates (invert + invert + NAND) $\mathrm{NOR}(\mathrm{NOR}(x,y),\, \mathrm{NOR}(x,y))$  — 2 gates (NOR + inverter)

Symmetry: NAND is "good at AND" (cheaper at 2 gates) and "expensive at OR" (3 gates). NOR is the dual — good at OR, expensive at AND. Both reach NOT in 1 gate. Choose the family that matches your function's dominant operation to minimize gate count.

Why both work: apply DeMorgan in two directions. From NAND: $\overline{xy} = \overline{x} + \overline{y}$ — so NAND with inverted inputs = OR. From NOR: $\overline{x+y} = \overline{x} \cdot \overline{y}$ — so NOR with inverted inputs = AND. The "invert each input then NAND/NOR" recipe is just DeMorgan applied directly.

2-level rule: any minimum-cost SOP maps to a 2-level NAND-NAND circuit (each AND becomes a NAND, the final OR also becomes a NAND). Any minimum-cost POS maps to a 2-level NOR-NOR circuit (each OR becomes a NOR, the final AND also becomes a NOR). Same wiring topology, just swap the gate type — that's the practical reason NAND/NOR are the standard building blocks of CMOS gate libraries.

2.1EasyTier 1?R
Write the truth table for $f = x_1 \cdot x_2 + \overline{x_1} \cdot x_3$. How many rows does it contain?
2.2EasyTier 1?R
Apply DeMorgan's theorem to find the complement of $f = (a + b) \cdot (c + d)$.
2.3MediumTier 1?R
Express the function $f(x_1, x_2, x_3) = \sum m(1,2,5,6,7)$ in canonical SOP and POS forms.
2.4MediumTier 1?R
Use a 3-variable Karnaugh map to minimize $f(x_1, x_2, x_3) = \sum m(0,1,2,5,6,7)$.
2.5MediumTier 1?R
Use a 4-variable Karnaugh map to minimize $f(x_1, x_2, x_3, x_4) = \sum m(0,2,5,7,8,10,13,15)$.
2.6MediumTier 1?R
Minimize the function $f(x_1, x_2, x_3, x_4) = \sum m(1,3,4,6,9,11,12,14) + D(0,5)$ where $D$ represents don't-care conditions.
2.7EasyTier 1?R
Show that a 2-input NAND gate is functionally complete (i.e., any Boolean function can be implemented using only NAND gates).
2.8MediumTier 1?R
Design a logic circuit for a 3-way light control: the light changes state whenever any one of three switches is toggled. Give the truth table and a minimum SOP expression.
2.9MediumTier 1?R
Write a behavioral Verilog module for a 2-to-1 multiplexer with inputs w0, w1, select s, and output f.
2.10MediumTier 1?R
A majority function outputs 1 when two or more of its three inputs are 1. Write the truth table, derive the minimum SOP expression, and draw the gate-level circuit.
2.11MediumTier 1?R
Define the terms: minterm, maxterm, implicant, prime implicant, essential prime implicant. Give an example of each for a 3-variable function.
2.12EasyTier 1E?R
A light $L$ is controlled by two toggle switches $x$ and $y$. The light must be on only when exactly one switch is up. Derive the truth table and a logic expression for $L$, and identify the resulting function.
2.13EasyTier 1E?R
Design a 1-bit binary adder that takes inputs $a$ and $b$ and produces a 2-bit sum $S = s_1 s_0 = a + b$. Give the truth table, derive expressions for $s_1$ and $s_0$, and draw the gate-level circuit.
2.14EasyTier 1E?R
Prove the Boolean identity $(x_1+\overline{x_3})(\overline{x_1}+x_3) = x_1\cdot x_3 + \overline{x_1}\cdot\overline{x_3}$ using algebraic manipulation.
2.15MediumTier 1E?R
Use algebraic manipulation to prove that $\overline{x_1}\cdot\overline{x_3} + \overline{x_2}\cdot x_3 + x_1\cdot x_3 + x_2\cdot\overline{x_3} = x_1\cdot x_2 + \overline{x_1}\cdot\overline{x_2} + x_1\cdot\overline{x_2}$ and find the simplest expression for the function.
2.16EasyTier 1E?R
Use a Venn diagram to prove the dual distributive property $x + y\cdot z = (x+y)\cdot(x+z)$.
What is a Venn diagram?

A Venn diagram represents Boolean variables as overlapping circles inside a rectangle (the universe). Each region corresponds to one minterm of the truth table: inside circle $x$ = "x is 1", outside = "x is 0". The intersection of two circles = AND; the union = OR; the area outside a circle = NOT.

Two-variable Venn (4 regions = 4 truth-table rows):

xyx·ȳx·yx̄·yx̄·ȳ

Three-variable Venn (8 regions = 8 truth-table rows):

xyzx·y·z̄x·zy·zx·y·z

Operators visually:

OperationRegion
$x \cdot y$ (AND)intersection of $x$ and $y$
$x + y$ (OR)union of $x$ and $y$
$\overline{x}$ (NOT)everything outside circle $x$

Use: shade LHS and RHS separately — if the shaded patterns match, the identity is proven.

2.17EasyTier 1E?R
Prove DeMorgan's theorem $\overline{x \cdot y} = \overline{x} + \overline{y}$ using Venn diagrams.
2.18MediumTier 1E?R
A gumball-sorting conveyor has three sensors: $s_1$ (too light), $s_2$ (too small), $s_3$ (too large). A gumball is rejected ($f=1$) if it is too large, or if it is both too light and too small. Derive the truth table and the canonical SOP expression, then simplify $f$ to a minimum-cost form using Boolean algebra.
Context: Example 2.7 — gumball factory (Figure 2.21)

Setup: a conveyor moves gumballs past three sensors:

  • $s_1 = 1$ if the gumball is too light (weight sensor)
  • $s_2 = 1$ if the gumball is too small (diameter sensor)
  • $s_3 = 1$ if the gumball is too large (diameter sensor)

A trap door rejects the gumball when output $f = 1$. Reject rule: reject if it is too large, OR (too small AND too light).

Figure 2.21a — conveyor schematic:

conveyor →s₁ (weight)s₂ (diam ↓)s₃ (diam ↑)trap door (open if f=1)f = reject

Figure 2.21b — truth table:

$s_1$$s_2$$s_3$$f$
0000
0011
0100
0111
1000
1011
1101
1111

Example 2.7 derivation (the original textbook approach):

SOP from minterms: $f = \overline{s_1}\overline{s_2}s_3 + \overline{s_1}s_2 s_3 + s_1\overline{s_2}s_3 + s_1 s_2\overline{s_3} + s_1 s_2 s_3$

Replicate the $s_1 s_2 s_3$ term (rule 7b), then group:

$= \overline{s_1}s_3(\overline{s_2}+s_2) + s_1 s_3(\overline{s_2}+s_2) + s_1 s_2(\overline{s_3}+s_3) = \overline{s_1}s_3 + s_1 s_3 + s_1 s_2$

Combine the first two terms: $f = s_3 + s_1 s_2$

What problem 2.19 asks: show a different simplification path that ends at the same result. Repeat the term $s_1 s_2\overline{s_3}$, then factor by $\overline{s_3}$:

$f = s_3(\overline{s_1}\overline{s_2}+\overline{s_1}s_2+s_1\overline{s_2}+s_1 s_2) + s_1 s_2(\overline{s_3}+s_3) = s_3 \cdot 1 + s_1 s_2 = s_3 + s_1 s_2$

The bracketed sum spans every valuation of $(s_1, s_2)$, so it equals 1. Same result, different route — illustrating that algebraic minimization isn't unique.

2.19MediumTier 1E?R
Show an alternative algebraic simplification of the gumball reject function (Example 2.7) by first replicating the term $s_1 s_2 \overline{s_3}$ and then factoring to obtain $f = s_3 + s_1 s_2$.
2.20MediumTier 1E?R
Derive the same minimum expression $f = s_3 + s_1 s_2$ for the gumball reject function using the consensus and DeMorgan identities, instead of the algebraic steps used in Examples 2.7 and 2.8.— example 2.7
2.21MediumTier 1E?R
Derive the canonical SOP for $f(x_1,x_2,x_3) = \sum m(2,3,4,6,7)$ and simplify it algebraically to a minimum-cost expression.
2.22MediumTier 1E?R
Write the canonical SOP for $f(x_1,x_2,x_3,x_4) = \sum m(3,7,9,12,13,14,15)$, then use Boolean algebra to derive a simpler SOP expression.
2.23MediumTier 1E?R
For $f(x_1,x_2,x_3) = \sum m(2,3,4,6,7) = \prod M(0,1,5)$, derive the canonical POS expression and simplify it to a minimum-cost POS form.
2.24MediumTier 1E?R
Implement $f(x_1,x_2,x_3) = \sum m(2,3,4,6,7)$ using only NOR gates by starting from its minimum POS form $f=(\overline{x_1}+x_2)(x_2+\overline{x_3})$.
Context: can NOR alone implement AND, NOT, OR? (it can — and how)

Yes — NOR is functionally complete: every Boolean function can be built using only NOR gates. Three base recipes:

NOT — one NOR with both inputs shorted: $\mathrm{NOR}(x, x) = \overline{x+x} = \overline{x}$.

xNOR

OR — two NORs (NOR followed by inverter): $x + y = \overline{\overline{x+y}} = \mathrm{NOR}(\mathrm{NOR}(x, y), \mathrm{NOR}(x, y))$.

xyNORx+y(inv.)NORx+y

AND — three NORs (two inverters + one NOR), via DeMorgan: $x \cdot y = \overline{\overline{x} + \overline{y}} = \mathrm{NOR}(\overline{x}, \overline{y})$.

xyNORNORȳNORx·y

Summary — gate counts:

FunctionNORs neededConstruction
NOT1$\mathrm{NOR}(x, x)$
OR2NOR followed by inverter
AND3invert each input, then NOR
NAND4AND followed by inverter (3 + 1)
XOR5$x\oplus y = (x+y)(\overline{x}+\overline{y})$ — POS-to-NOR-NOR

Once you have NOR, every other gate (and any function whatsoever) follows. The same is true for NAND alone — both are single-gate universals, which is why CMOS gate libraries are typically built around them.

Application to problem 2.24: $f = (\overline{x_1}+x_2)(x_2+\overline{x_3})$ — already in 2-level POS form, which maps directly to a 2-level NOR-NOR network:

  1. NORa: $\mathrm{NOR}(x_1, x_1) = \overline{x_1}$  (inverter)
  2. NORb: $\mathrm{NOR}(x_3, x_3) = \overline{x_3}$  (inverter)
  3. NOR1: $\mathrm{NOR}(\overline{x_1}, x_2) = \overline{\overline{x_1}+x_2}$  (first sum, inverted)
  4. NOR2: $\mathrm{NOR}(x_2, \overline{x_3}) = \overline{x_2+\overline{x_3}}$  (second sum, inverted)
  5. NOR3: $\mathrm{NOR}(\mathrm{NOR1}, \mathrm{NOR2}) = (\overline{x_1}+x_2)(x_2+\overline{x_3}) = f$  (re-inverts and ANDs by DeMorgan)

Total: 5 NOR gates.

x₁x₂x₃NORx̄₁NORx̄₃NOR1NOR2NOR3f= (x̄₁+x₂)(x₂+x̄₃)
2.25MediumTier 1E?R
Implement $f(x_1,x_2,x_3) = \sum m(2,3,4,6,7)$ using only NAND gates by starting from its minimum SOP form $f = x_2 + \overline{x_1}\cdot\overline{x_3}$.
2.26HardTier 1E?R
Design a BCD-to-7-segment decoder. The 4-bit input $X = x_3 x_2 x_1 x_0$ represents decimal 0–9; codes 1010–1111 are don't-cares. Derive minimum-cost SOP expressions for the seven segment outputs $a$ through $g$ using Karnaugh maps with don't-cares.
2.27HardTier 1E?R
Two 4-variable functions are given by $f_1 = \overline{x_1}\overline{x_3}+x_1 x_3+\overline{x_2}\overline{x_3}\overline{x_4}$ and $f_2 = \overline{x_1} x_3+x_1\overline{x_3}+\overline{x_2}\overline{x_3}\overline{x_4}$. Find a combined multi-output realization that minimizes total gate cost by sharing common product terms.
2.28HardTier 1E?R
For two 4-variable functions $f_3$ and $f_4$ whose individually minimum-cost SOPs share no common product terms, show how using non-prime implicants together can yield a lower-cost combined two-output circuit. Illustrate with the function pair from Figure 2.65.— example 2.19
2.29HardTier 1E?R
Find the minimum-cost POS expressions for the functions $f_1$ and $f_2$ of Example 2.16, and show that their combined POS implementation is more expensive than the corresponding shared SOP realization.
Context: Example 2.16 / 2.18 — Figure 2.64 (multiple-output synthesis)

Setup. Two 4-variable functions $f_1$ and $f_2$ are to be implemented in a single combined circuit (shared gates where possible).

Figure 2.64a / 2.64b — K-maps:

$f_1$ K-map
$x_3x_4{=}00$011110
$x_1x_2{=}00$1··1
011··1
11·11·
10·111
$f_2$ K-map
$x_3x_4{=}00$011110
$x_1x_2{=}00$1··1
0111·1
11·11·
10·11·

Example 2.16 — minimum SOP (with sharing)

$f_1 = \overline{x_1}\,\overline{x_3} + x_1 x_3 + \overline{x_2} x_3 x_4$

$f_2 = \overline{x_1}\,\overline{x_3} + x_1 x_3 + x_2 \overline{x_3} x_4$

The first two product terms are identical → those AND gates are shared in Figure 2.64c. Combined cost: 6 gates / 16 inputs = 22 (versus 28 for two separate circuits).

Example 2.18 — minimum POS (problem 2.29's task)

$f_1 = (x_1 + \overline{x_3})(\overline{x_1} + x_3)(\overline{x_1} + \overline{x_3} + x_4)$

$f_2 = (x_1 + \overline{x_3})(\overline{x_1} + x_3)(\overline{x_1} + \overline{x_3} + \overline{x_4})$

The first two sum terms are common (could be shared), but the K-maps reveal no 0-cell grouping that simultaneously appears in both functions — so beyond those two shared OR gates, no additional sum terms can be merged advantageously. Each function still needs three OR gates + one AND gate + 11 inputs ≈ 30 total (or ~26 if you share the two common sum-term ORs).

Conclusion: 22 (SOP, shared) < 26–30 (POS) — for these particular K-maps, the SOP form admits more sharing because the 1-cells cluster into product terms that overlap, while the 0-cells don't cluster compatibly. This is highly function-dependent — Example 2.17 (Figure 2.65, $f_3, f_4$) shows the opposite ordering can occur.

Note on Figure 2.65: that figure illustrates the same trade-off for a different pair $f_3, f_4$ where the textbook compares prime-implicant-only realizations against intentionally-shared non-prime implicants — see Example 2.17 / 2.19 (different problem in the study guide, not this one).

2.30HardTier 1E?R
Find the minimum-cost combined POS implementation for the function pair $f_3, f_4$ of Example 2.17 by sharing common sum terms, and compare its cost to the SOP-based realization.
Context: Example 2.17 / 2.19 — Figure 2.65 (multiple-output synthesis with shared implicants)

Setup. Two 4-variable functions $f_3$ and $f_4$ are to be implemented as a single combined circuit. Whereas Example 2.16 used only prime implicants and shared the obviously-common ones, Example 2.17 deliberately uses some non-prime implicants to expose more sharing opportunities.

Figure 2.65a / 2.65b — K-maps:

$f_3$ K-map (minterms 1,3,5,7,13,14,15)
$x_1x_2{=}00$011110
$x_3x_4{=}00$····
01111·
11111·
10··1·
$f_4$ K-map
$x_1x_2{=}00$011110
$x_3x_4{=}00$··11
011·11
111·11
10··1·

Example 2.17 — minimum SOP using only prime implicants:

$f_3 = \overline{x_1}x_4 + x_2 x_4 + x_1 x_2 x_3$

$f_4 = \overline{x_1}\overline{x_2}\overline{x_4} + x_1 \overline{x_2} \overline{x_3} + x_1\overline{x_4}$  (or equivalent — six AND gates total, no AND can be shared)

Combined cost with no sharing: 6 ANDs + 2 ORs + 21 inputs = 29.

Example 2.17 — better SOP using shared non-prime implicants:

$f_3 = \overline{x_1}x_2 x_4 + x_1 x_2 x_3 \overline{x_4} + \overline{x_1}x_4$

$f_4 = \overline{x_1}x_2 x_4 + x_1 x_2 x_3 \overline{x_4} + x_2\overline{x_4}$

Now the first two product terms are identical in both expressions and can share AND gates. Combined cost: 6 gates + 17 inputs = 23 — a 6-input saving over the prime-implicant realization.

Example 2.19 — minimum POS for the same pair (problem 2.30 asks this):

$f_3 = (x_3 + x_4)(x_2 + x_4)(x_1 + x_4)(\overline{x_1} + x_2)$

$f_4 = (x_3 + x_4)(x_2 + x_4)(x_1 + x_4)(\overline{x_1} + x_2 + \overline{x_4})$

The first three sum terms are identical in both functions — three shared OR gates costing six inputs. Plus one 2-input OR and one 4-input AND for $f_3$, and one 3-input OR and one 4-input AND for $f_4$. Combined cost: 5 ORs + 2 ANDs + 19 inputs = 26.

Comparison:

RealizationCost
SOP — prime-implicant only (Ex 2.17, baseline)29
SOP — shared non-prime implicants (Ex 2.17, optimized)23
POS — shared sum terms (Ex 2.19, this problem)26

Lesson: SOP with intentionally-non-minimum (shared) implicants beats POS for this pair. The choice of SOP vs POS, and prime-vs-shared implicants, depends on the K-map geometry — modern synthesis tools explore both.

2.31MediumTier 1E?R
Determine whether the equation $\overline{x_1} x_3 + x_2 \overline{x_3} + x_1 x_2 = x_1 \overline{x_2} + \overline{x_1} x_2 + \overline{x_2} \overline{x_3}$ is valid by deriving the canonical SOP for each side.
2.32MediumTier 1E?R
Design the minimum-cost POS expression for $f(x_1,x_2,x_3,x_4) = \sum m(0,2,4,5,6,7,8,10,12,14,15)$ by starting from its maxterm representation.
2.33MediumTier 1E?R
A control circuit has three inputs $x_1,x_2,x_3$ and recognizes three conditions: $A = x_3(x_1+\overline{x_2})$, $B = x_1(\overline{x_2}+\overline{x_3})$, $C = x_2(x_1+\overline{x_3})$. Design the simplest circuit whose output $f=1$ when at least two of $A,B,C$ are true.
2.34MediumTier 1E?R
Solve the majority-of-three-conditions problem from Example 2.22 using Venn diagrams instead of algebraic manipulation, and confirm that $f = x_1(x_2+x_3)$.— example 2.22
2.35MediumTier 1E?R
Use algebraic manipulation (consensus, combining, and absorption) to derive the simplest SOP expression for $f = \overline{x_2} x_3 \overline{x_4} + \overline{x_1} \overline{x_3} \overline{x_4} + x_1 x_2 \overline{x_4}$.
2.36MediumTier 1E?R
Use algebraic manipulation to derive the simplest POS expression for $f = (x_1+\overline{x_2}+x_3)(x_1+x_2+\overline{x_4})(\overline{x_1}+\overline{x_3}+x_4)$.
2.37HardTier 1E?R
Determine the minimum-cost SOP and POS expressions for $f(x_1,x_2,x_3,x_4)=\sum m(4,6,8,10,11,12,15) + D(3,5,7,9)$ using K-maps. Discuss how different assignments to the don't-cares yield different functions for the SOP and POS forms.
2.38HardTier 1E?R
Use Karnaugh maps to find the minimum-cost SOP and POS expressions for $f(x_1,\ldots,x_4) = \overline{x_1}\overline{x_3}\overline{x_4} + \overline{x_3} x_4 + x_1\overline{x_2} x_4 + x_1\overline{x_2}\overline{x_3} x_4$ with $D=(9,12,14)$.
2.39MediumTier 1E?R
Derive a minimum-cost SOP expression for $f = s_3(s_1+s_2)+\overline{s_1}\overline{s_2}$ by first expanding via the distributive law and then minimizing with a 3-variable K-map.
2.40MediumTier 1E?R
Write Verilog code that uses only continuous assign statements to describe a circuit with inputs $x,y,z$ and outputs $f = (\overline{y \oplus z})\cdot z + (y \oplus z)\cdot x$ and $g = (y \oplus z)\oplus x$.
2.41MediumTier 1E?R
Write hierarchical Verilog code for a circuit that shares one 1-bit adder between two pairs of operands $(a,b)$ and $(c,d)$ via two 2-to-1 multiplexers controlled by a select input $m$. Use separate modules for the multiplexer and the adder.
2.42HardTier 1E*必了解何謂LUT?R
Show how to implement $f = x_1 x_2 \overline{x_4} + \overline{x_2} x_3 x_4 + \overline{x_1}\overline{x_2}\overline{x_3}$ in an FPGA whose logic blocks are 3-input lookup tables (3-LUTs). Give a straightforward LUT mapping and discuss whether decomposition could reduce the LUT count.