04-BS-8 · May 2016
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
National Exams — May 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/FPGA architectures, flip-flop conversion, sequential design, arithmetic circuits; Floyd, Digital Fundamentals (11th ed., Pearson) — decoders, number systems, flip-flop characteristic tables, counters.
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. Clock $f_{CP}=0.25\ \text{Hz}$; cycle = Green 24 s → Green+Yellow 4 s → Red 28 s, repeating; three active-low TTL LED-driver outputs.
Find. A counter-based controller (part a) sized to the cycle, plus its timing diagram; and whether a shift-register alternative exists (part b).
Approach. Convert every interval to clock PULSES (not seconds), size a modulo-N counter to the total cycle length, then decode fixed counter-value ranges into each LED’s active-low drive using simple combinational decode logic (no PLD needed for only three ranges).
| Quantity | Result |
|---|---|
| Clock period | 4 s/pulse |
| Counter size | 4-bit, modulo-14 (counts 0–13) |
| Green interval | counts 0–5 (6 counts × 4 s = 24 s) |
| Green+Yellow interval | count 6 (1 count × 4 s = 4 s) |
| Red interval | counts 7–13 (7 counts × 4 s = 28 s) |
Part (b). Yes — a shift register can replace the binary counter using the classic "ring counter" (one-hot) technique: load a single 1 into a 14-bit circular shift register and clock it once per 4-second tick; each of the 14 flip-flop outputs is active for exactly one count, so the LED decode becomes a simple OR of the relevant flip-flop outputs (bit0–bit5→Green, bit6→Green&Yellow, bit7–bit13→Red) with NO extra AND/comparator logic, at the cost of needing 14 flip-flops instead of 4 — a direct trade of gate count for flip-flop count. A Johnson (twisted-ring) counter would only need $\lceil 14/2\rceil=7$ flip-flops for 14 unique codes, but then requires decode logic to recover single-count resolution, erasing most of the ring counter’s simplicity advantage; for this problem the straight 14-bit ring counter is the natural "shift register" answer.
| Quantity | Result |
|---|---|
| Feasible with shift register? | Yes — 14-bit ring (one-hot) counter |
| Register size | $\boxed{14\ \text{bits}}$ (one per count, matching the mod-14 cycle) |