How unit 3 is examined
Flip-flops (SR, JK, D, T, master-slave), race-around, shift registers and counters carry most marks (design questions on counters and T flip-flops repeat); memories (SRAM, DRAM, Flash, ROM) and PLA come next.
Sequential logic: flip-flops, D, T, S-R, J-K Master-Slave
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. <mark>A flip-flop is a 1-bit bistable memory element with two stable states, 0 and 1, that stays in its state until a clocked input changes it.</mark> A sequential circuit is one whose output depends on the present inputs and on past inputs (stored state), so it needs memory and feedback.
Comparison.
| Basis | Combinational | Sequential |
|---|---|---|
| Output depends on | Present inputs only | Present inputs and present state |
| Memory | None | Flip-flops store state |
| Feedback | None | Output fed back to input |
| Clock | Not needed | Usually clocked |
| Speed | Faster | Slower |
| Examples | Adder, MUX, decoder | Counter, register, FSM |
Key points.
- SR flip-flop (NOR latch): S=1,R=0 sets Q=1; S=0,R=1 resets Q=0; S=R=0 holds the state; S=R=1 is forbidden because both outputs go 0 and the final state is unpredictable.
- Characteristic equation of SR is $Q_{n+1}=S+\bar{R}Q_n$ with $SR=0$.
- JK removes the forbidden state: J=K=0 holds, J=0,K=1 resets, J=1,K=0 sets, J=K=1 toggles; $Q_{n+1}=J\bar{Q}_n+\bar{K}Q_n$.
- D flip-flop copies the input at the clock edge, $Q_{n+1}=D$; it is a JK with $K=\bar J$ and is used in registers.
- T flip-flop toggles when T=1 and holds when T=0, $Q_{n+1}=T\oplus Q_n$; it is a JK with J=K=T and is used in counters.
- Edge-triggered means the flip-flop changes only at a clock transition (positive edge 0 to 1, or negative edge 1 to 0), so it samples inputs for an instant.
- Excitation table (Q to Q+): SR: 00 -> S0 R-; 01 -> S1 R0; 10 -> S0 R1; 11 -> S- R0. JK: 00 -> J0 K-; 01 -> J1 K-; 10 -> J- K1; 11 -> J- K0. T: T = Q xor Q+.
| J | K | $Q_{n+1}$ |
|---|---|---|
| 0 | 0 | $Q_n$ |
| 0 | 1 | 0 |
| 1 | 0 | 1 |
| 1 | 1 | $\bar{Q}_n$ |
Master-slave JK. Two JK latches in series: master enabled by CLK=1, slave enabled by inverted clock (CLK=0).
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-01" viewBox="0 0 510 295" width="510" height="295" role="img" aria-label="Master-slave JK: Mas = master latch, Sla = slave latch, Inv = clock inverter, feedback of Q and Q-bar to the master gates"><style>#dsfig-u3-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-01 .t{fill:#16181D;font-weight:500}#dsfig-u3-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-01 .dot{fill:#16181D}#dsfig-u3-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-01 .ah{fill:#454C5A}#dsfig-u3-01 .ah.hi{fill:#2340B8}#dsfig-u3-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-01 .e{stroke:#B1B7C3}html.dark #dsfig-u3-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-01 .t{fill:#E6E8ED}html.dark #dsfig-u3-01 .t.inv{fill:#0F1115}html.dark #dsfig-u3-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-01 .dot{fill:#E6E8ED}html.dark #dsfig-u3-01 .ann{fill:#8FA3FF}html.dark #dsfig-u3-01 .lbl{fill:#858D9C}html.dark #dsfig-u3-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-01 .ah{fill:#B1B7C3}html.dark #dsfig-u3-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah9" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh9" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M56.4,49.6 L168.1,115.4" marker-end="url(#ah9)"/><path class="e" d="M59,126 L165.2,126" marker-end="url(#ah9)"/><path class="e" d="M54.2,242.4 L170.5,139.9" marker-end="url(#ah9)"/><path class="e" d="M59,255 L165.2,255" marker-end="url(#ah9)"/><path class="e" d="M200.1,242 L308.5,140.4" marker-end="url(#ah9)"/><path class="e" d="M205.2,126 L302.8,126" marker-end="url(#ah9)"/><path class="e" d="M342.8,126 L449,126" marker-end="url(#ah9)"/><path class="e" d="M451,126 L207.2,126" marker-end="url(#ah9)"/><g class="wl"><rect x="293.8" y="117" width="68.7" height="18" rx="9"/><text class="t" x="328.1" y="126" dy=".35em" text-anchor="middle">feedback</text></g><circle class="n" cx="40" cy="255" r="18"/><text class="t" x="40" y="255" dy=".35em" text-anchor="middle">C</text><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">J</text><circle class="n" cx="40" cy="126" r="18"/><text class="t" x="40" y="126" dy=".35em" text-anchor="middle">K</text><circle class="n" cx="186.2" cy="126" r="18"/><text class="t" x="186.2" y="126" dy=".35em" text-anchor="middle">Mas</text><circle class="n" cx="186.2" cy="255" r="18"/><text class="t" x="186.2" y="255" dy=".35em" text-anchor="middle">Inv</text><circle class="n" cx="323.8" cy="126" r="18"/><text class="t" x="323.8" y="126" dy=".35em" text-anchor="middle">Sla</text><circle class="n" cx="470" cy="126" r="18"/><text class="t" x="470" y="126" dy=".35em" text-anchor="middle">Q</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Master-slave JK: Mas = master latch, Sla = slave latch, Inv = clock inverter, feedback of Q and Q-bar to the master gates</figcaption></figure>
- While CLK=1 the master follows J,K and the slave is isolated, so Q does not move.
- When CLK falls to 0 the master is isolated and the slave copies the master, so Q changes once, at the falling edge.
- Output cannot re-enter the master during the same pulse, so J=K=1 toggles exactly once (race-around avoided).
Example (Nov 2022 design, T flip-flops). Assign S1=00, S2=01, S3=10, S4=11 (state AB, $T=Q\oplus Q^+$). Excitation over (A B X): $T_A=1$ for 001, 011, 100, 101, 111; $T_B=1$ for 001, 100. Z=1 for 000, 010, 011, 100.
$$T_A = X + A\bar{B},\quad T_B=\bar{B}(A\oplus X),\quad Z=\bar{B}\bar{X}+\bar{A}B$$
Answer frame. Flip-flop / master-slave: define flip-flop, draw the NAND master-slave figure with inverted clock, give the truth table, explain the CLK=1 and CLK=0 phases, close with race-around removal. RS: define, draw NOR latch, truth table with forbidden row. Design: assignment, transition table, T excitation, K-maps, two T flip-flops with gates for $T_A,T_B,Z$.
Pitfall: In the design, T=1 when the bit changes ($Q\oplus Q^+$), not when the next bit is 1.
Asked: [7 marks] (Jun 2020, Dec 2023, Dec 2025) What is Flip-Flop? Explain Master Slave J-K flip-flop (with timing diagram). Asked: [7 marks] (Nov 2018) What is a flip flop? Explain the principle of operation of RS flip flop with truth table. Asked: [7 marks] (Nov 2018, Nov 2019) What are sequential circuits? Differentiate combinational and sequential circuits. Asked: [7 marks] (Nov 2019) Draw logic diagram of JK Flip-Flop and give its characteristics table and equation. Asked: [7 marks] (May 2019) What is Shift Register? Explain J-K flip flop. Asked: [7 marks] (Nov 2022) Design a sequential circuit using T flip-flop for the given state table (S1..S4, X=0/1, output Z). Asked: [7 marks] (Jun 2023) What is meant by 'edge triggered'? Differentiate SR-FF and JK-FF with functional operation and excitation tables.
Racing condition
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. ==Race-around is the uncontrolled repeated toggling of a level-triggered JK flip-flop when J=K=1 and the clock pulse width $t_p$ is longer than the propagation delay $\Delta t$.== In general a race means the result depends on which of two signals with unequal delays arrives first.
Key points.
- In an SR flip-flop, S=R=1 drives both outputs to the same value, and when both inputs go to 0 together the flip-flop races to an unpredictable state, hence S=R=1 is forbidden.
- JK feeds Q and $\bar Q$ back to the input gates, so J=K=1 gives a valid toggle instead of an invalid state.
- With a level-triggered JK and J=K=1, the output toggles after $\Delta t$, the new value feeds back while the clock is still high, and it toggles again.
- The output therefore oscillates many times in one pulse and ends in an unpredictable state, which is the race-around condition.
- Condition to avoid: $t_p<\Delta t<T$, which is hard to guarantee, so the fix is structural.
- Master-slave: the master works at CLK=1 and the slave at CLK=0, and the two are never open together, so there is no path from output back to master during a pulse.
- Other fixes: edge-triggered flip-flops (very narrow sampling window) or a pulse narrower than the delay.
CLK : _|‾‾‾‾‾‾‾|____
Q : _|‾‾|_|‾‾|____ J=K=1, level JK: toggles every delay, ends unpredictable
Q : ______|‾‾‾‾‾‾‾ Master-slave: one toggle at falling edge
For the master-slave circuit see the diagram in the previous topic.
Answer frame. Open with the definition and the J=K=1 condition; draw the timing waveform above; explain points 3-5; draw the master-slave figure; explain CLK=1 and CLK=0 phases; close with "the output changes only once, at the falling edge". For SR question, state S=R=1 invalid and then JK toggle.
Asked: [7 marks] (May 2019) What is sequential circuit? Explain racing condition. Asked: [7 marks] (Dec 2020) Explain the race condition in S-R flip flop. Also explain how it is removed in J-K flip flop. Asked: [7 marks] (Dec 2024) Explain race-around condition in J-K flip-flops using timing relationships; draw the clocked Master-Slave J-K and explain how it removes race-around.
Edge and level triggered circuits
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. <mark>A level-triggered circuit responds to inputs during the whole time the clock is at a given level, while an edge-triggered circuit responds only at the clock transition.</mark>
Key points.
- Level-triggered devices (latches, gated SR, plain JK) are transparent while the clock is high, so input changes pass to the output and can cause race-around.
- Positive-edge triggering acts on the 0 to 1 transition, negative-edge on 1 to 0 (shown by a bubble at the clock input).
- Edge-triggered flip-flops sample the input for an instant, so they are race-free and need input stable only near the edge (setup and hold time).
- Master-slave behaves as edge-triggered at the output because Q changes once, at the falling edge.
Shift registers
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. <mark>A shift register is a group of cascaded flip-flops sharing one clock in which the stored bits move one place per clock pulse.</mark> An n-bit register stores n bits.
Key points.
- SISO: serial in, serial out; a delay line taking n clocks to output a bit.
- SIPO: serial in, parallel out; converts serial data to parallel.
- PISO: parallel in, serial out (a load/shift control); converts parallel to serial.
- PIPO: parallel in, parallel out; a plain storage register.
- Bidirectional (shift left-right): a MUX in front of each D input picks the left or right neighbour using a control line (1 = right, 0 = left).
- Universal shift register: four D flip-flops with a 4:1 MUX before each D input; select lines $S_1S_0$ choose the mode.
- Modes: 00 no change (Q fed back), 01 shift right (from left neighbour, serial input at MSB side), 10 shift left (from right neighbour), 11 parallel load ($I_0..I_3$).
| $S_1$ | $S_0$ | Operation | MUX input used |
|---|---|---|---|
| 0 | 0 | No change | $Q_i$ |
| 0 | 1 | Shift right | $Q_{i-1}$ |
| 1 | 0 | Shift left | $Q_{i+1}$ |
| 1 | 1 | Parallel load | $I_i$ |
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-02" viewBox="0 0 415.4 217.6" width="415.4" height="217.6" role="img" aria-label="4-bit universal shift register. Mi = 4:1 MUX i, Fi = D flip-flop i (output Qi). All MUXes share S1,S0; all flip-flops share the clock. Each MUX also takes its own Qi (hold) and parallel input Ii."><style>#dsfig-u3-02 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-02 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-02 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-02 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-02 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-02 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-02 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-02 .t{fill:#16181D;font-weight:500}#dsfig-u3-02 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-02 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-02 .dot{fill:#16181D}#dsfig-u3-02 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-02 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-02 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-02 .ah{fill:#454C5A}#dsfig-u3-02 .ah.hi{fill:#2340B8}#dsfig-u3-02 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-02 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-02 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-02 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-02 .e{stroke:#B1B7C3}html.dark #dsfig-u3-02 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-02 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-02 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-02 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-02 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-02 .t{fill:#E6E8ED}html.dark #dsfig-u3-02 .t.inv{fill:#0F1115}html.dark #dsfig-u3-02 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-02 .dot{fill:#E6E8ED}html.dark #dsfig-u3-02 .ann{fill:#8FA3FF}html.dark #dsfig-u3-02 .lbl{fill:#858D9C}html.dark #dsfig-u3-02 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-02 .ah{fill:#B1B7C3}html.dark #dsfig-u3-02 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-02 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-02 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-02 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh10" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M40,59 L40,156.6" marker-end="url(#ah10)"/><path class="e" d="M151.8,59 L151.8,156.6" marker-end="url(#ah10)"/><path class="e" d="M263.6,59 L263.6,156.6" marker-end="url(#ah10)"/><path class="e" d="M375.4,59 L375.4,156.6" marker-end="url(#ah10)"/><path class="e" d="M52,162.9 L138.6,56.3" marker-end="url(#ah10)"/><path class="e" d="M163.8,162.9 L250.4,56.3" marker-end="url(#ah10)"/><path class="e" d="M275.6,162.9 L362.2,56.3" marker-end="url(#ah10)"/><path class="e" d="M363.4,162.9 L276.8,56.3" marker-end="url(#ah10)"/><path class="e" d="M251.6,162.9 L165,56.3" marker-end="url(#ah10)"/><path class="e" d="M139.8,162.9 L53.2,56.3" marker-end="url(#ah10)"/><g class="wl"><rect x="72.4" y="99.8" width="47.1" height="18" rx="9"/><text class="t" x="95.9" y="108.8" dy=".35em" text-anchor="middle">right</text></g><g class="wl"><rect x="184.2" y="99.8" width="47.1" height="18" rx="9"/><text class="t" x="207.7" y="108.8" dy=".35em" text-anchor="middle">right</text></g><g class="wl"><rect x="296" y="99.8" width="47.1" height="18" rx="9"/><text class="t" x="319.5" y="108.8" dy=".35em" text-anchor="middle">right</text></g><g class="wl"><rect x="299.1" y="99.8" width="40.8" height="18" rx="9"/><text class="t" x="319.5" y="108.8" dy=".35em" text-anchor="middle">left</text></g><g class="wl"><rect x="187.3" y="99.8" width="40.8" height="18" rx="9"/><text class="t" x="207.7" y="108.8" dy=".35em" text-anchor="middle">left</text></g><g class="wl"><rect x="75.5" y="99.8" width="40.8" height="18" rx="9"/><text class="t" x="95.9" y="108.8" dy=".35em" text-anchor="middle">left</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">M3</text><circle class="n" cx="151.8" cy="40" r="18"/><text class="t" x="151.8" y="40" dy=".35em" text-anchor="middle">M2</text><circle class="n" cx="263.6" cy="40" r="18"/><text class="t" x="263.6" y="40" dy=".35em" text-anchor="middle">M1</text><circle class="n" cx="375.4" cy="40" r="18"/><text class="t" x="375.4" y="40" dy=".35em" text-anchor="middle">M0</text><circle class="n" cx="40" cy="177.6" r="18"/><text class="t" x="40" y="177.6" dy=".35em" text-anchor="middle">F3</text><circle class="n" cx="151.8" cy="177.6" r="18"/><text class="t" x="151.8" y="177.6" dy=".35em" text-anchor="middle">F2</text><circle class="n" cx="263.6" cy="177.6" r="18"/><text class="t" x="263.6" y="177.6" dy=".35em" text-anchor="middle">F1</text><circle class="n" cx="375.4" cy="177.6" r="18"/><text class="t" x="375.4" y="177.6" dy=".35em" text-anchor="middle">F0</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">4-bit universal shift register. Mi = 4:1 MUX i, Fi = D flip-flop i (output Qi). All MUXes share S1,S0; all flip-flops share the clock. Each MUX also takes its own Qi (hold) and parallel input Ii.</figcaption></figure>
- Example: right shift of 1011 with serial input 0 gives 0101, then 0010 on the next clock.
Answer frame. Open with the definition; draw the universal register (four D flip-flops, four 4:1 MUXes, $S_1S_0$); write the mode table; explain each mode in one sentence; close with the four uses (delay, serial-parallel conversion, storage, counters). For left-right: draw a 2:1 MUX per stage and explain direction control.
Asked: [7 marks] (Dec 2020) What is a Shift Register? Draw and explain shift Left-Right shift register. Asked: [7 marks] (Jun 2023, Dec 2024) Describe (draw and explain) the 4-bit universal shift register with a neat diagram.
Asynchronous and synchronous counters, types and state diagrams
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>
Definition. <mark>A counter is a sequential circuit that goes through a prescribed sequence of states on clock pulses; in an asynchronous (ripple) counter the clock drives only the first flip-flop and each later stage is clocked by the previous output, while in a synchronous counter all flip-flops share the same clock.</mark>
| Basis | Asynchronous (ripple) | Synchronous |
|---|---|---|
| Clock | Cascaded, from previous stage | Common to all |
| Delay | Adds up, $n\cdot t_{pd}$ | One $t_{pd}$ |
| Speed | Slow, low max frequency | Fast |
| Logic | Very simple, no gates | Extra gates |
| Glitches | Yes in decoding | No |
Key points.
- A mod-N counter uses n flip-flops with $2^n\ge N$ (mod-10 needs 4).
- Ripple binary counter: JK/T flip-flops with J=K=1, each toggling on the falling edge of the previous Q.
- Ripple decade counter (Dec 2024): 4 JK flip-flops, J=K=1, counting 0000 to 1001; at count 10 (1010) Q3 and Q1 are both 1, a NAND of Q3 and Q1 drives the active-low CLEAR of all flip-flops, so it resets to 0000.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-03" viewBox="0 0 527.2 209" width="527.2" height="209" role="img" aria-label="Ripple decade counter. A,B,C,D = JK flip-flops (J=K=1) giving Q0..Q3; N = NAND of Q3,Q1 driving CLR of all four"><style>#dsfig-u3-03 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-03 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-03 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-03 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-03 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-03 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-03 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-03 .t{fill:#16181D;font-weight:500}#dsfig-u3-03 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-03 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-03 .dot{fill:#16181D}#dsfig-u3-03 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-03 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-03 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-03 .ah{fill:#454C5A}#dsfig-u3-03 .ah.hi{fill:#2340B8}#dsfig-u3-03 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-03 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-03 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-03 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-03 .e{stroke:#B1B7C3}html.dark #dsfig-u3-03 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-03 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-03 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-03 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-03 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-03 .t{fill:#E6E8ED}html.dark #dsfig-u3-03 .t.inv{fill:#0F1115}html.dark #dsfig-u3-03 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-03 .dot{fill:#E6E8ED}html.dark #dsfig-u3-03 .ann{fill:#8FA3FF}html.dark #dsfig-u3-03 .lbl{fill:#858D9C}html.dark #dsfig-u3-03 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-03 .ah{fill:#B1B7C3}html.dark #dsfig-u3-03 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-03 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-03 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-03 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh11" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L130.8,40" marker-end="url(#ah11)"/><path class="e" d="M170.8,40 L242.6,40" marker-end="url(#ah11)"/><path class="e" d="M282.6,40 L354.4,40" marker-end="url(#ah11)"/><path class="e" d="M394.4,40 L466.2,40" marker-end="url(#ah11)"/><path class="e" d="M487.2,59 L487.2,148" marker-end="url(#ah11)"/><path class="e" d="M280.1,49.5 L469,158.5" marker-end="url(#ah11)"/><path class="e" d="M469.5,162.2 L171.4,47.5" marker-end="url(#ah11)"/><g class="wl"><rect x="474" y="95.5" width="26.4" height="18" rx="9"/><text class="t" x="487.2" y="104.5" dy=".35em" text-anchor="middle">Q3</text></g><g class="wl"><rect x="362.2" y="95.5" width="26.4" height="18" rx="9"/><text class="t" x="375.4" y="104.5" dy=".35em" text-anchor="middle">Q1</text></g><g class="wl"><rect x="302.7" y="95.5" width="33.6" height="18" rx="9"/><text class="t" x="319.5" y="104.5" dy=".35em" text-anchor="middle">CLR</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">CLK</text><circle class="n" cx="151.8" cy="40" r="18"/><text class="t" x="151.8" y="40" dy=".35em" text-anchor="middle">A</text><circle class="n" cx="263.6" cy="40" r="18"/><text class="t" x="263.6" y="40" dy=".35em" text-anchor="middle">B</text><circle class="n" cx="375.4" cy="40" r="18"/><text class="t" x="375.4" y="40" dy=".35em" text-anchor="middle">C</text><circle class="n" cx="487.2" cy="40" r="18"/><text class="t" x="487.2" y="40" dy=".35em" text-anchor="middle">D</text><circle class="n" cx="487.2" cy="169" r="18"/><text class="t" x="487.2" y="169" dy=".35em" text-anchor="middle">N</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Ripple decade counter. A,B,C,D = JK flip-flops (J=K=1) giving Q0..Q3; N = NAND of Q3,Q1 driving CLR of all four</figcaption></figure>
- Synchronous up/down counter with M (M=1 up, M=0 down), T flip-flops: $T_0=1$; $T_1=MQ_0+\bar M\bar Q_0$; $T_2=MQ_0Q_1+\bar M\bar Q_0\bar Q_1$; $T_3=MQ_0Q_1Q_2+\bar M\bar Q_0\bar Q_1\bar Q_2$. For 3 bits use $T_0..T_2$ only. Each stage toggles when all lower bits are 1 (up) or all 0 (down).
- Timing: all outputs change together at the clock edge; $Q_0$ toggles every clock, $Q_1$ every 2, $Q_2$ every 4, $Q_3$ every 8. With M switched, the count reverses direction.
- Random sequence 0,2,4,5,7,0 with D flip-flops: 3 flip-flops, states 1,3,6 unused (don't cares), $D=Q^+$.
| Present $Q_2Q_1Q_0$ | Next | $D_2D_1D_0$ |
|---|---|---|
| 000 (0) | 010 (2) | 010 |
| 010 (2) | 100 (4) | 100 |
| 100 (4) | 101 (5) | 101 |
| 101 (5) | 111 (7) | 111 |
| 111 (7) | 000 (0) | 000 |
From the K-maps: $D_2=Q_2\oplus Q_1$, $D_1=\bar Q_1(\bar Q_2+Q_0)$, $D_0=Q_2\bar Q_1$.
- State diagram (Nov 2022): "even" means 0. The next state is Even only when $xy=00$, else Odd; $z=1$ only for $xy=00$. The next state does not depend on the present state.
| State | 00 | 01 | 10 | 11 |
|---|---|---|---|---|
| Even | Even/1 | Odd/0 | Odd/0 | Odd/0 |
| Odd | Even/1 | Odd/0 | Odd/0 | Odd/0 |
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-04" viewBox="0 0 338 80" width="338" height="80" role="img" aria-label="E = Even, O = Odd. From either state input 00 goes to E with z=1, inputs 01, 10, 11 go to O with z=0. Self-loops: E on 00/1, O on 01,10,11 with 0"><style>#dsfig-u3-04 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-04 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-04 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-04 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-04 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-04 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-04 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-04 .t{fill:#16181D;font-weight:500}#dsfig-u3-04 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-04 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-04 .dot{fill:#16181D}#dsfig-u3-04 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-04 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-04 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-04 .ah{fill:#454C5A}#dsfig-u3-04 .ah.hi{fill:#2340B8}#dsfig-u3-04 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-04 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-04 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-04 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-04 .e{stroke:#B1B7C3}html.dark #dsfig-u3-04 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-04 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-04 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-04 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-04 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-04 .t{fill:#E6E8ED}html.dark #dsfig-u3-04 .t.inv{fill:#0F1115}html.dark #dsfig-u3-04 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-04 .dot{fill:#E6E8ED}html.dark #dsfig-u3-04 .ann{fill:#8FA3FF}html.dark #dsfig-u3-04 .lbl{fill:#858D9C}html.dark #dsfig-u3-04 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-04 .ah{fill:#B1B7C3}html.dark #dsfig-u3-04 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-04 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-04 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-04 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M61,40 L277,40" marker-end="url(#ah12)" marker-start="url(#ah12)"/><g class="wl"><rect x="110.4" y="31" width="117.3" height="18" rx="9"/><text class="t" x="169" y="40" dy=".35em" text-anchor="middle">00/1,01-10-11/0</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">E</text><circle class="n" cx="298" cy="40" r="18"/><text class="t" x="298" y="40" dy=".35em" text-anchor="middle">O</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">E = Even, O = Odd. From either state input 00 goes to E with z=1, inputs 01, 10, 11 go to O with z=0. Self-loops: E on 00/1, O on 01,10,11 with 0</figcaption></figure>
Answer frame. Compare: define counter, explain each type with a 3-bit timing figure, table of five differences, one application each (ripple: frequency dividers; synchronous: CPUs). Decade: sequence, NAND reset, figure. Up/down: state table, excitation, K-map equations, circuit, timing. Random: step 6 in order (flip-flop count, table, D equations, circuit).
Pitfall: Forgetting that count 10 appears briefly in a ripple decade counter before the reset acts.
Asked: [7 marks] (Jun 2020, Dec 2025) Explain synchronous and Asynchronous counter (compare on speed and hardware complexity). Asked: [7 marks] (Nov 2022) Draw the state diagram for the Even/Odd sequential system with inputs x(t), y(t) and output z(t). Asked: [7 marks] (Nov 2022) Design a synchronous counter to count 0, 2, 4, 5, 7, 0, ... using D flip-flop. Asked: [7 marks] (Dec 2023, Jun 2023) Design a 4-bit up/down synchronous binary counter with a neat timing diagram (also 3-bit with direction control M using T flip-flop). Asked: [7 marks] (Dec 2024) Design a ripple decade counter using JK flip-flop.
Semiconductor memories
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>Semiconductor memory stores binary data in an integrated circuit as an array of cells, organised as words and read or written by address.</mark>
Key points.
- Classification: RAM (read/write, volatile: SRAM and DRAM) and ROM (read mostly, non-volatile: mask ROM, PROM, EPROM, EEPROM, Flash).
- SRAM stores a bit in a flip-flop of 4-6 transistors, so it is fast and needs no refresh but is bulky and costly; used for cache.
- DRAM stores a bit as charge on a capacitor with one transistor, so it is dense and cheap but the charge leaks and must be refreshed every few milliseconds; used as main memory.
- ROM keeps its contents with power off; it is programmed by mask, by fuse (PROM), by UV erase (EPROM) or electrically (EEPROM); used for BIOS and firmware.
- Capacity is (number of words) x (bits per word); n address lines select $2^n$ words.
- ROM structure: a decoder selects a word line, and diodes or transistors at crossings give the stored 1s and 0s on the bit lines.
Answer frame. Open with the definition; draw the classification tree; give SRAM cell versus DRAM cell in two lines; write DRAM (capacitor, refresh) in full since it is part of the question; close with applications.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-05" viewBox="0 0 473 198" width="473" height="198" role="img" aria-label="Semiconductor memory classification"><style>#dsfig-u3-05 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-05 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-05 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-05 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-05 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-05 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-05 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-05 .t{fill:#16181D;font-weight:500}#dsfig-u3-05 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-05 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-05 .dot{fill:#16181D}#dsfig-u3-05 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-05 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-05 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-05 .ah{fill:#454C5A}#dsfig-u3-05 .ah.hi{fill:#2340B8}#dsfig-u3-05 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-05 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-05 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-05 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-05 .e{stroke:#B1B7C3}html.dark #dsfig-u3-05 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-05 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-05 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-05 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-05 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-05 .t{fill:#E6E8ED}html.dark #dsfig-u3-05 .t.inv{fill:#0F1115}html.dark #dsfig-u3-05 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-05 .dot{fill:#E6E8ED}html.dark #dsfig-u3-05 .ann{fill:#8FA3FF}html.dark #dsfig-u3-05 .lbl{fill:#858D9C}html.dark #dsfig-u3-05 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-05 .ah{fill:#B1B7C3}html.dark #dsfig-u3-05 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-05 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-05 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-05 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah13" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh13" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><line class="e" x1="182.4" y1="39" x2="74" y2="103"/><line class="e" x1="182.4" y1="39" x2="290.8" y2="103"/><line class="e" x1="74" y1="103" x2="40" y2="167"/><line class="e" x1="74" y1="103" x2="108" y2="167"/><line class="e" x1="290.8" y1="103" x2="176" y2="167"/><line class="e" x1="290.8" y1="103" x2="247.5" y2="167"/><line class="e" x1="290.8" y1="103" x2="326.5" y2="167"/><line class="e" x1="290.8" y1="103" x2="405.5" y2="167"/><rect class="n" x="148.9" y="24" width="67" height="30" rx="8"/><text class="t" x="182.4" y="39" dy=".35em" text-anchor="middle">Memory</text><circle class="n" cx="74" cy="103" r="17"/><text class="t" x="74" y="103" dy=".35em" text-anchor="middle">RAM</text><rect class="n" x="14" y="152" width="52" height="30" rx="8"/><text class="t" x="40" y="167" dy=".35em" text-anchor="middle">SRAM</text><rect class="n" x="82" y="152" width="52" height="30" rx="8"/><text class="t" x="108" y="167" dy=".35em" text-anchor="middle">DRAM</text><circle class="n" cx="290.8" cy="103" r="17"/><text class="t" x="290.8" y="103" dy=".35em" text-anchor="middle">ROM</text><rect class="n" x="150" y="152" width="52" height="30" rx="8"/><text class="t" x="176" y="167" dy=".35em" text-anchor="middle">PROM</text><rect class="n" x="218" y="152" width="59" height="30" rx="8"/><text class="t" x="247.5" y="167" dy=".35em" text-anchor="middle">EPROM</text><rect class="n" x="293" y="152" width="67" height="30" rx="8"/><text class="t" x="326.5" y="167" dy=".35em" text-anchor="middle">EEPROM</text><rect class="n" x="376" y="152" width="59" height="30" rx="8"/><text class="t" x="405.5" y="167" dy=".35em" text-anchor="middle">Flash</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Semiconductor memory classification</figcaption></figure>
Asked: [7 marks] (Jun 2020, Nov 2022) Write short notes on i) Semiconductor memories ii) DRAM.
Introduction to digital ICs 2716, 2732 and their address decoding
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. <mark>IC 2716 is a 2K x 8 (16 Kbit) UV-erasable EPROM and IC 2732 is a 4K x 8 (32 Kbit) EPROM.</mark>
Key points.
- 2716 has 11 address lines (A0-A10) and 8 data lines (D0-D7), and 2732 has 12 address lines (A0-A11) and 8 data lines.
- Both work from 5 V, are erased by ultraviolet light through a quartz window, and are read using chip enable and output enable.
- Address decoding: the high address lines of the CPU go to a decoder (or NAND gates) whose output drives chip select, so each chip occupies its own range of addresses.
- Example: a 2716 needs A0-A10 directly, and A11-A15 decode to chip select, giving a 2 KB block such as 0000H-07FFH.
Modern trends in semiconductor memories: DRAM, Flash RAM
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>DRAM stores bits as charge in capacitors and needs refresh, while Flash is non-volatile memory that stores charge on a floating gate and is erased in blocks.</mark>
| Basis | SRAM | DRAM |
|---|---|---|
| Cell | Flip-flop (6 transistors) | 1 transistor + 1 capacitor |
| Refresh | Not needed | Needed every few ms |
| Speed | Faster | Slower |
| Density | Low | High |
| Cost per bit | High | Low |
| Power | Low when idle | Higher (refresh) |
| Use | Cache | Main memory |
Key points.
- DRAM write puts charge on the capacitor (1) or discharges it (0), read senses the charge and destroys it, so it is rewritten after every read.
- Refresh reads and rewrites each row periodically; DRAM is volatile.
- Flash uses a floating-gate MOSFET, where trapped charge changes the threshold voltage and represents the bit.
- Flash is non-volatile, is written by tunnelling or hot electrons, and is erased in blocks (not per byte), which is why it is fast.
- NOR flash allows random read and suits code storage; NAND flash is denser and cheaper and suits data storage.
- Applications: DRAM in main memory; Flash in USB drives, SSDs, memory cards and smartphones.
- ROM: non-volatile, holds firmware/BIOS. Flash is electrically erasable ROM with wear limit on erase cycles.
Answer frame. Differentiate: define both, table of seven rows, applications. DRAM and Flash: draw 1T-1C cell and floating-gate cell, then working, volatility, refresh versus block erase, close with uses. For ROM/PLA/DRAM/Flash question give four short paragraphs, each with principle and application.
Asked: [7 marks] (Nov 2019) Differentiate static and dynamic RAM. Asked: [7 marks] (Dec 2023) Explain: DRAM and FLASH RAM. Asked: [7 marks] (Nov 2022) Explain the working and applications of ROM, PLA, DRAM and FLASH RAM.
Designing with ROM and PLA
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. <mark>A PLA (Programmable Logic Array) is a programmable logic device with a programmable AND array followed by a programmable OR array, which implements sum-of-products functions.</mark>
Key points.
- Inputs pass through buffers giving true and complement lines, the AND plane forms product terms, and the OR plane sums selected products into each output.
- Programming is done by blowing fuses (or anti-fuses) at crosspoints; an intact fuse means the input is used.
- A ROM has a fixed AND array (a full decoder giving all $2^n$ minterms) and a programmable OR array, so any truth table can be stored, but it wastes terms.
- A PLA has only the product terms needed, so it is smaller, and it can share terms between outputs; PAL programs only the AND array.
- Designing with ROM: n inputs and m outputs need a $2^n\times m$ ROM whose contents are the truth table.
- Applications: combinational logic, code converters and state machines.
<figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-06" viewBox="0 0 510 80" width="510" height="80" role="img" aria-label="PLA block diagram: inputs with buffers, programmable AND plane, programmable OR plane, outputs"><style>#dsfig-u3-06 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-06 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-06 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-06 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-06 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-06 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-06 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-06 .t{fill:#16181D;font-weight:500}#dsfig-u3-06 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-06 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-06 .dot{fill:#16181D}#dsfig-u3-06 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-06 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-06 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-06 .ah{fill:#454C5A}#dsfig-u3-06 .ah.hi{fill:#2340B8}#dsfig-u3-06 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-06 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-06 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-06 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-06 .e{stroke:#B1B7C3}html.dark #dsfig-u3-06 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-06 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-06 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-06 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-06 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-06 .t{fill:#E6E8ED}html.dark #dsfig-u3-06 .t.inv{fill:#0F1115}html.dark #dsfig-u3-06 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-06 .dot{fill:#E6E8ED}html.dark #dsfig-u3-06 .ann{fill:#8FA3FF}html.dark #dsfig-u3-06 .lbl{fill:#858D9C}html.dark #dsfig-u3-06 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-06 .ah{fill:#B1B7C3}html.dark #dsfig-u3-06 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-06 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-06 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-06 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah14" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh14" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L165.2,40" marker-end="url(#ah14)"/><path class="e" d="M205.2,40 L311.4,40" marker-end="url(#ah14)"/><path class="e" d="M351.4,40 L449,40" marker-end="url(#ah14)"/><g class="wl"><rect x="89.6" y="31" width="47.1" height="18" rx="9"/><text class="t" x="113.1" y="40" dy=".35em" text-anchor="middle">A,B,C</text></g><g class="wl"><rect x="224.9" y="31" width="68.7" height="18" rx="9"/><text class="t" x="259.3" y="40" dy=".35em" text-anchor="middle">products</text></g><g class="wl"><rect x="377.7" y="31" width="47.1" height="18" rx="9"/><text class="t" x="401.2" y="40" dy=".35em" text-anchor="middle">F1,F2</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">In</text><circle class="n" cx="186.2" cy="40" r="18"/><text class="t" x="186.2" y="40" dy=".35em" text-anchor="middle">AND</text><circle class="n" cx="332.4" cy="40" r="18"/><text class="t" x="332.4" y="40" dy=".35em" text-anchor="middle">OR</text><circle class="n" cx="470" cy="40" r="18"/><text class="t" x="470" y="40" dy=".35em" text-anchor="middle">Out</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">PLA block diagram: inputs with buffers, programmable AND plane, programmable OR plane, outputs</figcaption></figure>
Example (Dec 2025). $F_1=\bar AB+AC$, $F_2=AB+B\bar C$. Product terms: P1 = $\bar AB$, P2 = $AC$, P3 = $AB$, P4 = $B\bar C$ (four terms, no sharing).
| Term | A | B | C | F1 | F2 |
|---|---|---|---|---|---|
| P1 $\bar AB$ | 0 | 1 | - | 1 | - |
| P2 $AC$ | 1 | - | 1 | 1 | - |
| P3 $AB$ | 1 | 1 | - | - | 1 |
| P4 $B\bar C$ | - | 1 | 0 | - | 1 |
(0 = complement fuse kept, 1 = true fuse kept, - = both blown.)
Answer frame. PLA note: define, draw the block diagram above with fuses, explain programming, compare with PAL and ROM in three lines. Implementation: list product terms, programming table, draw AND-OR fuse map, close with outputs.
Asked: [7 marks] (Dec 2024) Write a short note on PLA. Asked: [7 marks] (Dec 2025) Implement F1 = A'B + AC, F2 = AB + BC' using PLA; draw the PLA programming table. Asked: [7 marks] (May 2019) Write short notes on i) PLA ii) FLASH RAM.
Last-minute revision
- Flip-flop = 1-bit bistable memory; sequential output depends on past inputs, combinational does not.
- SR: S=R=1 forbidden; $Q_{n+1}=S+\bar RQ_n$.
- JK: $Q_{n+1}=J\bar Q+\bar KQ$; J=K=1 toggles; T: $Q_{n+1}=T\oplus Q$; D: $Q_{n+1}=D$.
- Race-around when J=K=1 and $t_p>\Delta t$ in a level-triggered JK; cured by master-slave or edge triggering.
- Master works at CLK=1, slave at CLK=0.
- Universal shift register: 4 D flip-flops + 4 4:1 MUX; $S_1S_0$: 00 hold, 01 right, 10 left, 11 load.
- Ripple decade counter: NAND of Q3 and Q1 clears at 1010.
- Ripple delay is $n\cdot t_{pd}$; synchronous delay is one $t_{pd}$.
- Random counter 0,2,4,5,7: $D_2=Q_2\oplus Q_1$, $D_1=\bar Q_1(\bar Q_2+Q_0)$, $D_0=Q_2\bar Q_1$.
- DRAM = 1T + 1C, refresh needed; SRAM = flip-flop; Flash = floating gate, block erase.
- PLA: programmable AND and OR; ROM: fixed AND, programmable OR.
- 2716 = 2K x 8, 2732 = 4K x 8.
Memory hooks
- "SR forbids 11; JK toggles 11; T toggles on 1; D copies."
- Master-slave: "master when CLK high, slave when low", like a lock with two doors.
- Ripple = domino, synchronous = orchestra with one conductor.
- Universal register modes 00, 01, 10, 11 = hold, right, left, load.
- DRAM leaks like a bucket with a hole (refresh), Flash traps charge in a sealed gate.
Coverage checklist
- Sequential logic: flip flops, D,T, S-R, J-K Master- Slave: flip-flop, master-slave, RS, JK, edge-triggered, sequential vs combinational, T design.
- racing condition: race-around, SR race, master-slave fix.
- Edge & Level triggered circuits: definition and comparison.
- Shift registers: left-right and universal shift register.
- Asynchronous and synchronous counters, their types and state diagrams: comparison, Even/Odd diagram, random counter, up/down counter, ripple decade counter.
- Semiconductor memories: classification, SRAM/DRAM, ROM.
- Introduction to digital ICs 2716, 2732 etc. & their address decoding: 2716, 2732 and decoding.
- Modern trends in semiconductor memories such as DRAM, FLASH RAM etc.: SRAM vs DRAM, DRAM and Flash, ROM/PLA/DRAM/Flash.
- Designing with ROM and PLA: PLA note, PLA implementation, PLA and Flash notes.