NivaarExam PrepOfficial exam papers ↗

04-BS-8 · December 2017

Question 4 of 5: Weighted-Share Voting Logic Circuit

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.

Question 4: Weighted-Share Voting Logic Circuit (25 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Check: Figure P4 shows three switches, labelled B, C, D — matching the three named stockholders Bob, Chris and Dave — plus a chassis ground symbol, which is not an input. This solution uses the three-switch circuit as drawn (each switch pulled up to +5V through its own 4.7 kΩ resistor, closing to ground when its owner votes yes).

Given. Bob = 4 shares, Chris = 6 shares, Dave = 3 shares (13 total). Each switch is pulled up to +5V through 4.7 kΩ; closing it (voting yes) connects that line to ground. The circuit’s four outputs Y3 Y2 Y1 Y0 report the 4-bit binary total of shares voting yes.

Find. (a) the truth table; (b) minimized Boolean equations for Y3, Y2, Y1, Y0; (c) a PAL16L8 realization.

Approach. Define b, c, d = 1 when Bob, Chris, Dave respectively vote yes (the logic-level convention used for the truth table and equations — the switch itself pulls its line to ground when closed, so a Set/Reset-style buffer or an inverting sense line recovers this active-high “yes” convention from the raw switch input, exactly as an active-low pushbutton is debounced to an active-high logic signal in any switch-input design). Total yes-shares = 4b + 6c + 3d (0–13, fits in 4 bits); tabulate all 8 (b,c,d) combinations, then K-map each output bit.

Part (a) — truth table (b,c,d = 1 when that stockholder votes yes)
bcdYes-shares (4b+6c+3d)Y3 Y2 Y1 Y0
00000000
00130011
01060110
01191001
10040100
10170111
110101010
111131101
  1. Part (b) — Y0 (LSB). Every weight contributing an odd share count is Dave’s 3, so the sum’s LSB simply tracks d: $$\boxed{Y_0 = d}$$ (Bob’s 4 and Chris’s 6 are both even and never flip the LSB).
  2. Y1. K-mapping bit-1 of the sum over (b,c,d) shows it is high exactly when c and d disagree: $$\boxed{Y_1 = c\,d' + c'\,d = c \oplus d}$$
  3. Y2. K-mapping bit-2 gives three prime implicants (no larger group exists): $$\boxed{Y_2 = b\,c' + b\,d + b'\,c\,d'}$$ (bc′ and bd both fire whenever Bob votes yes with either Chris or Dave; b′cd′ is the lone case — only Chris voting yes — where bit 2 is set without Bob’s vote).
  4. Y3 (MSB). Bit-3 is set only at sums 9, 10 and 13, which K-map to two 2-cell groups: $$\boxed{Y_3 = c\,d + b\,c}$$
  5. Part (c) — PAL16L8. A PAL16L8 realizes any 2-level AND-OR function directly: each output line gets its own fixed OR gate fed by up to 7–8 programmable AND (product-term) rows, and the input buffers already provide both true and complemented forms of every input to the AND array. Mapping the equations above onto the device needs Y0 wired straight to d (bypassing the array entirely), Y1 two product terms (cd′, c′d), Y2 three product terms (bc′, bd, b′cd′), and Y3 two product terms (cd, bc) — all comfortably inside the 7-term-per-output budget. “Crossing the intact fuses” means leaving every AND-array intersection listed in the product-term table below connected (fused) and blowing every other intersection on that row open.
bcdbcdANDbcANDcdORANDbc'ANDbdANDb'cd'ORANDcd'ANDc'dORY3Y2Y1Y0
Fig. Q4(c) — the equivalent AND-OR network a PAL16L8 realizes for Y3…Y0: three inverters supply b′, c′, d′, seven product-term AND gates feed three fixed OR gates, and Y0 = d wires straight through.
PAL16L8 product-term (intact-fuse) table
OutputProduct terms (AND-array rows left intact)
Y3c·d  +  b·c
Y2b·c′  +  b·d  +  b′·c·d′
Y1c·d′  +  c′·d
Y0d (direct connection, no product term needed)
Final results — Question 4
OutputMinimized equation
Y3cd + bc
Y2bc' + bd + b'cd'
Y1c ⊕ d
Y0d
Example (all vote yes)Y3Y2Y1Y0 = 1101 = 13 shares