Question 3 of 5: Number Representation, Flip-Flop Identification & Boolean Minimization
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
National Exams — December 2017 — 04-BS-8 Digital Logic Circuits. Three-hour, closed-book exam (Casio or Sharp approved calculator only; one hand-written 8.5"×11" aid sheet permitted). Format: five questions offered, each worth 25 marks (100 total); any four constitute a complete paper and only the first four appearing in the answer book are marked. All five are solved below for completeness.
Reference texts: Mano & Ciletti, Digital Design (6th ed., Pearson) — Boolean minimization, PAL/PLA/FPGA architectures, flip-flop conversion, sequential design, arithmetic circuits; Floyd, Digital Fundamentals (11th ed., Pearson) — decoders, number systems, flip-flop characteristic tables, counters.
Given. (a) N = 10,000 (decimal, to be negated); a 1-bit full adder is to be built from AND/OR/XOR gates only. (b) the 4-row excitation table above. (c) F(w,x,y,z) = Σm(0,2,3,5,6,9,13).
Find. (a) the minimum bit-width and 2’s-complement pattern for −10,000, and the minimum AND/OR/XOR gate count for a full adder; (b) which flip-flop type the table describes; (c)(i) a Boolean-algebra-simplified SOP for F, (ii) F realized in minimum 2-input NAND gates.
Approach. (a) An n-bit 2’s-complement word represents down to −2n−1, so the minimum n satisfies 2n−1 ≥ 10,000; the pattern itself is 2n − 10,000. The full adder is built from the standard Sum/Carry identities. (b) Match the table’s four rows against the standard SR/JK/D/T excitation tables. (c) Group the 7 minterms on a 4-variable K-map, then convert the resulting SOP to NAND-NAND via double negation.
Part (a), bullet 1 — minimum bits. Need 2n−1 ≥ 10,000. 213=8,192 is too small; 214=16,384 clears it, so n−1=14. $$\boxed{n = 15 \text{ bits (minimum)}}$$ The 2’s complement pattern is 215 − 10,000 = 32,768 − 10,000 = 22,768, which in 15-bit binary is $$\boxed{(-10{,}000)_{10} = 101100011110000_2}$$.
Part (a), bullet 2 — full-adder gate count. The standard identities are $$Sum = A \oplus B \oplus C_{in}, \qquad C_{out} = A\cdot B + C_{in}\cdot(A\oplus B)$$ Computing the shared term A⊕B once and reusing it for both Sum and Cout gives: 1 XOR for (A⊕B), 1 XOR for Sum = (A⊕B)⊕Cin, 1 AND for A·B, 1 AND for Cin·(A⊕B), 1 OR to combine the two AND terms. $$\boxed{5 \text{ gates: 2 XOR + 2 AND + 1 OR (minimum with AND/OR/XOR only)}}$$ brute-force verified against the reference truth table for all 8 input rows.
Part (b) — identify the flip-flop. Reading each row as “to drive Qn→Qn+1, inputs A,B must be…”: 0→0 needs A=0,B=x; 0→1 needs A=1,B=0; 1→0 needs A=0,B=1; 1→1 needs A=x,B=0. This is exactly the textbook SR excitation table with A playing the role of Set and B the role of Reset (S=A produces a 1, R=B produces a 0, and both are don’t-care exactly when they are not needed to force the transition). Substituting into the SR characteristic equation Q+ = S + R′·Qn reproduces every row of the table. $$\boxed{\text{SR-type flip-flop: } A=S \text{ (Set)},\ B=R \text{ (Reset)}}$$
Part (c)(i) — simplify F. Plotting minterms 0,2,3,5,6,9,13 of F(w,x,y,z) on a K-map and grouping every pair of adjacent 1-cells (each group of 2 removes one variable; no group of 4 exists here) gives five essential prime implicants: minterms 0 and 2 share w′x′z′; 2 and 3 share w′x′y; 2 and 6 share w′yz′; 5 and 13 share xy′z; 9 and 13 share wy′z (minterm 13 is covered twice, which is fine — it is not a required essential term by itself). $$\boxed{F = w'x'z' + w'x'y + w'yz' + xy'z + wy'z}$$ verified against all 16 rows of the truth table by brute force.
Part (c)(ii) — minimum-NAND realization. Every term above is a 3-literal product, so each is built by a single 3-input NAND gate whose output is the term’s complement; a final 5-input NAND recombines the five term-NANDs, which by double negation equals the OR of the five terms — i.e. F itself. Four of the variables (w, x, y, z) are each needed in complemented form by at least one term, so four 1-input NAND gates (tied-input inverters) are added up front. $$\boxed{4 \text{ inverters} + 5\times\text{3-input NAND} + 1\times\text{5-input NAND} = 10 \text{ NAND gates}}$$ verified for all 16 input rows (Fig. Q3c).
Fig. Q3(a) — minimum-gate full adder: 2 XOR + 2 AND + 1 OR, sharing the A⊕B term between Sum and Cout.
Fig. Q3(c)(ii) — F realized in 10 NAND gates only: four input inverters feed five 3-input term-NANDs, combined by a final 5-input NAND.