04-BS-8 · December 2016
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
National Exams — December 2016 — 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 architectures, flip-flop conversion, sequential design, arithmetic circuits, serial 2's-complement conversion; Floyd, Digital Fundamentals (11th ed., Pearson) — decoders, number systems, flip-flop characteristic tables, counters and shift registers.
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.
Given. Five inputs (Select, Read-Mem, I2, I1, I0); ten active-low outputs Q0–Q9 whose activation pattern is fixed by Table 3.
Find. A minimum decoder+gate circuit realizing Table 3 exactly.
Approach. Recognize that Select=0 AND Read-Mem=0 is the ONLY condition under which any output is active, and that within that condition the remaining 3 inputs (I2,I1,I0) select exactly one of 8 codes — a textbook 3-to-8 decoder enable/select pattern. Check whether the 8 codes can be routed to the 10 outputs with no extra gates.
| Quantity | Result |
|---|---|
| Decoder count | 1 × 74LS138 (3-to-8) |
| Enable wiring | E1=Select, E2=Read-Mem (active-low); E3=Vcc |
| Extra gates needed | 0 (direct fan-out only, Y0→Q0/Q8, Y1→Q3/Q5) |
Part (b) — PAL16L8 implementation. A PAL16L8 provides 10 dedicated inputs and 8 dedicated active-low combinational outputs, each output being a programmable sum (OR) of up to 7 AND product terms. Because Q0 always equals Q8 and Q3 always equals Q5 (every row of Table 3 sets each pair identically), only 8 independent logic values are actually needed — {Q0(=Q8), Q3(=Q5), Q4, Q6, Q7, Q2, Q9, Q1} — which fits the PAL16L8's 8 output pins exactly, with the duplicate destinations (Q8, Q5) simply wired externally to the same pin as Q0 and Q3 respectively. The five inputs (Select, Read-Mem, I2, I1, I0) use only 5 of the 10 available dedicated input pins.
Each output needs only ONE product term (since each of the 8 signals is active for exactly one input combination, identical to the decoder-line logic above), e.g. the Q0/Q8 output's single live AND row is $\overline{\text{Select}}\cdot\overline{\text{Read-Mem}}\cdot\overline{I2}\cdot\overline{I1}\cdot\overline{I0}$ (fed by the true or complement fuse of each of the 5 relevant input lines, as required), and the PAL's active-low output buffer inverts the OR of that single term to produce the correct active-low signal directly — matching the same Boolean condition as decoder line Y0 above. On the fuse map, this means: for each of the 8 outputs, leave INTACT (do not blow) exactly the 5 input-fuses forming that output's required product term in ONE of its (up to 7) available AND rows, and blow every other fuse in that row and every fuse in all other unused rows for that output (an all-fuses-blown row contributes no term, i.e. is simply absent from the OR).
Part (c) — comparison. Both implementations realize the identical Boolean function with the identical minimum external-gate count (zero), so functionally and in raw gate economy they are equivalent for THIS problem. The decoder solution (part a) uses a single fixed-function MSI part whose internal structure cannot be altered; the PAL solution (part b) uses a single field-programmable part whose AND array can be reprogrammed to realize a completely different input/output mapping without changing the board at all. Advantages of the PAL family: (1) field reconfigurability — if the memory map or enable-output assignment changes later, only the fuse pattern is reprogrammed, not the hardware; (2) design consolidation — a PAL can absorb both the "decode" function AND any extra combinational logic (had the mapping been irregular enough to need gates beyond a plain decoder) into ONE package, whereas a fixed decoder would need separate discrete gates bolted on for any non-decoder-shaped output pattern; (3) fewer distinct part numbers to stock, since one programmable device type covers many different custom logic functions.