RS latch with NOR and NAND gates β race analysis β clocked RS β D flip-flop β JK flip-flop and race-around β Master-Slave JK β edge-triggered T flip-flop β asynchronous PRESET/CLEAR β excitation tables β flip-flop conversion with worked examples.
In combinational circuits (DE-05, DE-06), outputs depend only on current inputs. Sequential circuits add memory β the output depends on both current inputs and past history. The basic memory element storing one bit is the flip-flop.
The RS latch is the simplest memory element β two cross-coupled NOR gates where each gate’s output feeds back to the other’s input. S = Set (forces Q=1), R = Reset (forces Q=0). The outputs Q and QΜ are always complements β except in the forbidden state.
When the RS latch transitions between states, both gates must change simultaneously β but propagation delays differ. This causes a race between the two flip-flop transitions.
| Race type | Cause | Outcome | Acceptable? |
|---|---|---|---|
| Valid (non-critical) race | RS changes from 10 or 01 to 00 β both gates race, but both paths lead to the same stable state | Predictable β same stable state regardless of which gate wins | Yes β |
| Critical race | RS changes from 11 to 00 β one path reaches stable A (Q=0,QΜ=1) and another reaches stable B (Q=1,QΜ=0) | Unpredictable β outcome depends on inherent gate delays, which the designer cannot control | No β |
Applying De Morgan’s theorem to the NOR latch gives an equivalent NAND latch. Two cross-coupled NAND gates with NOT gates on the inputs produce an active-HIGH RS latch β identical characteristic table to the NOR version, forbidden state still S=R=1.
Without the input inverters, the NAND latch has active-LOW SΜ and RΜ inputs. The characteristic table is inverted: SΜ=RΜ=1 is the HOLD state; SΜ=0,RΜ=1 SETs; SΜ=1,RΜ=0 RESETs; SΜ=RΜ=0 is the forbidden state.
| SΜ | RΜ | Q(n+1) | Mode |
|---|---|---|---|
| 1 | 1 | Q(n) | HOLD |
| 0 | 1 | 1 | SET (Q=1) |
| 1 | 0 | 0 | RESET (Q=0) |
| 0 | 0 | FORBIDDEN β both outputs go HIGH | |
This active-low NAND latch is the core of all TTL flip-flop ICs β the PRESET and CLEAR asynchronous inputs are active-low precisely because of this latch topology.
Adding two AND gates (or NAND gates) in front of the latch creates a synchronous flip-flop β the latch only responds to inputs when the clock (CLK) is HIGH. When CLK=0 the AND gates block R and S, holding the latch in HOLD mode regardless of input changes.
Two different ways to determine when a flip-flop samples its inputs:
| Type | When FF responds | Symbol on CLK pin | Problem |
|---|---|---|---|
| Level-triggered | Output can change any time CLK is HIGH (or LOW) | No symbol | Multiple transitions possible during one clock pulse |
| Positive edge-triggered | Only on LOWβHIGH transition (rising edge) | Small triangle β· | None β inputs must be stable only around the edge |
| Negative edge-triggered | Only on HIGHβLOW transition (falling edge) | Triangle with bubble β·β | None |
A narrow spike at the rising edge is generated by: feed CLK through a NOT gate (propagation delay d), then AND the original CLK with the delayed inverted CLK. The AND output is HIGH only for those few nanoseconds when both CLK=1 and CLKΜ=1 simultaneously β exactly the propagation delay of the inverter, typically 5β10 ns.
The D (Data/Delay) flip-flop is a modified clocked RS flip-flop that eliminates the forbidden state by tying S=D and R=DΜ β the two inputs are always complements. Only one external input D is needed.
The JK flip-flop is a modified RS flip-flop where Jβ‘S and Kβ‘R, but the outputs are fed back to the AND gates. This means when J=K=1, the latch toggles β eliminating the forbidden state entirely.
| J | K | Q(n+1) | Mode |
|---|---|---|---|
| 0 | 0 | Q(n) | HOLD |
| 0 | 1 | 0 | RESET |
| 1 | 0 | 1 | SET |
| 1 | 1 | QΜ(n) | TOGGLE (complement) |
Characteristic equation: Q(n+1) = JΒ·QΜ(n) + KΜΒ·Q(n)
When J=K=1 and CLK is HIGH, the output toggles β feedback changes inputs β toggles again β infinite loop during the clock pulse. This is the race-around condition. Two solutions:
The T flip-flop is the simplest sequential element β it has a single input T and toggles on every clock edge when T=1. Built by connecting J and K inputs of a JK flip-flop together to form one T input.
| T | Q(n+1) | Mode |
|---|---|---|
| 0 | Q(n) | HOLD (no change) |
| 1 | QΜ(n) | TOGGLE (complement) |
Key application β Frequency Division: If T=1 permanently, the flip-flop toggles on every clock edge. The Q output is exactly half the clock frequency: f_out = f_CLK / 2. Chain n T flip-flops to divide by 2βΏ β the foundation of binary counters (DE-10).
In practical flip-flops, two additional inputs β PREΜ (Preset) and CLRΜ (Clear) β allow the flip-flop to be set or reset immediately, independent of the clock. They operate asynchronously (no clock needed) and are typically active-LOW.
| PREΜ | CLRΜ | Q | QΜ | Action |
|---|---|---|---|---|
| 1 | 1 | Normal JK operation | Clock controls output | |
| 0 | 1 | 1 | 0 | PRESET β sets Q=1 immediately |
| 1 | 0 | 0 | 1 | CLEAR β resets Q=0 immediately |
| 0 | 0 | Undefined | FORBIDDEN β both outputs try to be 1 | |
Two JK flip-flops in series with complementary clocking: the Master is enabled when CLK=1; the Slave is enabled when CLK=0 (CLK=1 disables Slave). Because the Slave is disabled while the Master is active, the Master’s output cannot feed back and cause race-around.
The characteristic table tells you next state given inputs and current state. The excitation table is the inverse β it tells you what inputs are required to achieve a given transition from Q(n) to Q(n+1). Excitation tables are essential for sequential circuit design and flip-flop conversion.
| Q(n) | Q(n+1) | S | R |
|---|---|---|---|
| 0 | 0 | 0 | Ο |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | Ο | 0 |
| Q(n) | Q(n+1) | J | K |
|---|---|---|---|
| 0 | 0 | 0 | Ο |
| 0 | 1 | 1 | Ο |
| 1 | 0 | Ο | 1 |
| 1 | 1 | Ο | 0 |
| Q(n) | Q(n+1) | D |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| Q(n) | Q(n+1) | T |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Any flip-flop type can be converted to any other type by adding a combinational circuit at the input that translates the required flip-flop’s input signals into the given flip-flop’s inputs. The method uses both excitation tables.
We have a JK FF and want it to behave as an RS FF. From the RS excitation table, find what J and K must be for each RS transition:
We have a D FF and want JK behaviour. For each JK input combination and Q(n), what D input is needed to achieve Q(n+1)?
The combinational circuit D = JΒ·QΜ + KΜΒ·Q is added between the JK inputs and the D flip-flop input. This is a 2-gate circuit: one AND-OR network with Q and QΜ feedback.
| Parameter | Symbol | Definition | Importance |
|---|---|---|---|
| Propagation delay (clockβQ) | t_PLH, t_PHL | Time from triggering clock edge to output transition (measured at 50% levels) | Limits maximum clock frequency |
| Set-up time | t_s | Minimum time data must be stable BEFORE the triggering clock edge | Violated = setup time violation β metastability |
| Hold time | t_h | Minimum time data must remain stable AFTER the triggering clock edge | Violated = hold time violation β metastability |
| Maximum clock frequency | f_max | Maximum clock rate at which FF operates reliably | Determines system speed limit |
| Minimum pulse width | t_CH, t_CL | Minimum HIGH time and minimum LOW time for the clock pulse | Specified in datasheet β must not be violated |
| Async PRESET/CLEAR delay | t_PLH (PRE), t_PHL (CLR) | Time from asynchronous input active to output responding | Determines initialisation speed |
| FF Type | Char. Equation | Forbidden / Special | Key Use |
|---|---|---|---|
| RS (NOR) | Q(n+1) = S + RΜΒ·Q(n) | S=R=1 forbidden (both Q=0) | Basic latch, input stage |
| RS (NAND, active-low) | Q(n+1) = SΜ’+ RΜ’Β·QΜ(n) | SΜ=RΜ=0 forbidden (both Q=1) | TTL internal latches |
| D | Q(n+1) = D | None β no forbidden state | Data registers, pipeline |
| JK | Q(n+1) = JΒ·QΜ + KΜΒ·Q | J=K=1 β toggle (no forbidden) | Universal β counters, registers |
| T | Q(n+1) = TβQ(n) | T=1 β toggle; T=0 β hold | Counters, frequency dividers |
| Conversion | Combinational logic needed |
|---|---|
| JK β RS | J = S K = R |
| D β JK | D = JΒ·QΜ + KΜΒ·Q |
| JK β D | J = D K = DΜ |
| JK β T | J = T K = T |