Synchronous Sequential Logic

Learn how digital circuits remember. Start with SR and D latches and the D, JK and T flip-flops built from them, then see how a shared clock and the setup and hold constraints decide how fast a circuit can run, including clock skew and metastability. Analyze clocked circuits with state equations, state tables and state diagrams, and design your own finite state machines: choose a Moore or Mealy machine, reduce and encode the states, and derive and check the flip-flop logic.

BeginnerLesson 4 of 7 in Digital Logic Design Course

What you will learn

  1. Explain how feedback lets a circuit remember a bit, and describe and trace SR and D latches and D, JK and T flip-flops.
    • Explain sequential circuits and the SR latch
      Tell sequential circuits from combinational ones and trace how a cross-coupled SR latch sets, resets and holds a bit.
    • Use a D latch and read its timing
      Explain how a gated D latch removes the invalid input, follow it through transparent and holding phases, and read a latch timing diagram.
    • Build and use edge-triggered D flip-flops
      Explain how an edge-triggered D flip-flop samples its input once per clock cycle, compare it with a latch, and use preset, clear and enable.
    • Describe JK and T flip-flops
      Use the characteristic tables and equations of JK and T flip-flops, trace them, and build them from a D flip-flop.
  2. Apply the rules of synchronous design and calculate whether a clocked circuit meets its setup and hold constraints, including the effects of clock skew and metastability.
    • Describe the clock and the rules of synchronous design
      Describe clock period, frequency and duty cycle, and explain the rules that make synchronous circuits predictable.
    • Calculate setup and hold limits and the maximum clock frequency
      Use flip-flop and logic delays to check the setup and hold constraints, find the shortest clock period, and fix violations.
    • Account for clock skew and metastability
      Include clock skew in the timing constraints, explain metastability, and use a two-flip-flop synchronizer and its mean time between failures.
  3. Derive equations, state tables and state diagrams from a given clocked circuit and predict its state and outputs for an input sequence.
    • Derive equations and a state table from a D flip-flop circuit
      Write the input, next-state and output equations of a circuit with D flip-flops and build its state table.
    • Draw state diagrams and trace input sequences
      Turn a state table into a state diagram, follow it through an input sequence and describe the circuit's behavior in words.
    • Analyze circuits with JK and T flip-flops
      Use the characteristic equations of JK and T flip-flops to find next states from their input equations.
  4. Turn a word description into a Moore or Mealy state diagram, reduce and encode its states, and derive and check the logic for D, JK or T flip-flops.
    • Compare Moore and Mealy machines
      Define finite state machines, tell Moore and Mealy machines apart, and compare their outputs, timing and number of states.
    • Turn a word description into a state diagram
      Decide what each state must remember, add a transition for every input in every state, and test the diagram with input sequences.
    • Reduce the number of states
      Find equivalent states with row matching and the implication table, merge them, and judge what reduction gains.
    • Choose a state assignment
      Encode states with binary, Gray or one-hot codes, count the flip-flops needed, and compare how the assignment changes the logic.
    • Derive flip-flop input equations and complete the design
      Use excitation tables and Karnaugh maps to derive the logic for D, JK or T flip-flops, handle unused states and check the finished circuit.

Synchronous Sequential Logic study guide

4 chapters

1

Store a bit and control when it changes

Memory lets a circuit respond to what happened earlier. Feedback first gives us a bit that can hold its value; set, reset, data and clock inputs then let us control it. Follow signals through SR and D latches, compare a transparent latch with an edge-triggered D flip-flop, and use the JK and T rules to predict changes at clock edges. The distinction between a level and an edge is the basis of every circuit that follows.

1.1 Feedback and the SR latch

A combinational circuit computes its outputs from its current inputs. A sequential circuit also remembers a state. One press of a push-on, push-off button can turn a lamp on or off because the lamp's stored state differs before the two presses.

How feedback stores a bit

Connect two inverters in a loop. If one output is 1, the other is 0, and feeding those values back supports the same pair. The opposite pair is stable too. This bistable circuit can hold one bit while power stays on. A circuit with n one-bit storage elements has at most 2n states; three bits allow eight combinations.

The loop needs control inputs to choose its state. An SR latch provides set and reset through two cross-coupled gates. For the NOR version, S and R are active-high: a 1 asserts the named action. A NOR gate produces 0 whenever any input is 1.

SRResult
00Hold the stored value
10Set Q to 1
01Reset Q to 0
11Invalid: both outputs are 0

To see a set operation, assert S while R is 0. S forces the complementary output low. That low value feeds the other gate, allowing Q to become 1. After S returns to 0, feedback preserves Q = 1.

Follow a sequence

Start with Q = 0 and apply the input pairs SR in order:

  1. 00 holds Q at 0.
  2. 10 sets Q to 1.
  3. 00 holds Q at 1.
  4. 01 resets Q to 0.
  5. 00 holds Q at 0.

The same input 00 produces different outputs because the latch remembers the preceding action.

With S = R = 1, both NOR outputs are 0 and cease to be complements. If both inputs are released together, small gate-delay differences decide the final value; brief oscillation or metastability can occur. If R returns to 0 first while S stays high, the latch is set. This invalid combination is not a toggle command.

Check which input level is active

A NAND SR latch uses active-low inputs, written S' and R'. A bubble or overbar also marks active-low operation.

S'R'Result
11Hold
01Set Q to 1
10Reset Q to 0
00Invalid: both outputs are 1

A changeover switch can drive these two inputs for debouncing. The first contact closure sets or resets the latch. Bounces repeat that action or briefly leave both inputs high, which holds the value. The switch arrangement keeps both inputs from being asserted together.

A gated SR latch adds an enable C. With C = 0, the latch holds regardless of S and R. With C = 1, its normal SR rules apply, including the invalid case. A clocked synchronous circuit uses storage to break feedback paths and controls state changes with a shared clock; an ordinary SR latch by itself has no such clock control.

Key Takeaways

  • Feedback supports two stable bit values.
  • NOR SR inputs are active-high; NAND SR inputs are active-low.
  • The inactive input pair holds the previous state.
  • Asserting both SR inputs gives an invalid output pair.
  • An enable controls when a gated SR latch accepts commands.

1.2 The open and closed phases of a D latch

A D latch accepts one data value, D, under an enable C. It removes the need to choose separate set and reset commands. For an active-high latch, C = 1 opens the latch and C = 0 closes it.

Make set and reset agree

The gated SR inputs are formed as

S=DC,R=D′C.

If C = 0, both inputs are 0 and the NOR latch holds. If C = 1, D = 1 asserts set and D = 0 asserts reset. In the logic model, D and D' cannot both be 1, so the invalid SR input is excluded.

The behavior can be written as

Q(t+1)=CD+C′Q(t).

When C is 1, the first term passes D. When C is 0, the second term preserves the stored value. Here “next” describes the latch's response during its enabled level, with no clock-edge wait.

Trace the transparent interval

While C = 1, the latch is transparent: Q follows D after the small internal delay. Every change of D during that interval matters. While C = 0, it is opaque: Q holds the value captured as the latch closed. An active-low latch reverses the open and closed levels; a bubble on its enable identifies that version.

Consider an ideal timing diagram with C high from 10 to 15 ns, 20 to 25 ns and 30 to 35 ns. D is 1 from 3 to 12 ns, 0 from 12 to 22 ns, 1 from 22 to 24 ns and 0 afterward. Start with Q = 0.

TimeWhat happensQ
3 nsD rises while the latch is closed0
10 nsC rises and the latch opens onto D = 11
12 nsD falls while the latch is open0
15–20 nsThe latch is closed0
22 nsD rises during the second open interval1
24 nsD falls before that interval ends0
25 ns onwardThe latch closes on 0 and later opens onto 00

To draw Q, first shade the high intervals of C. Copy D during those intervals. At each falling edge of C, carry the last D value horizontally through the closed interval. Use zero delay for an ideal diagram; include the stated gate delay when one is supplied.

Why a level is different from an edge

A rising-edge-only interpretation misses the changes at 12, 22 and 24 ns. The latch responds throughout its enabled level. A short D glitch during that level can therefore appear at Q, even if it ends before the latch closes.

Feedback makes this distinction especially important. If a transparent latch has D=Q′, every output change drives the opposite value back to its input. It can keep changing while C stays high, with timing set by gate delays. An edge-triggered flip-flop instead accepts a new state once per active edge, which gives a clocked feedback circuit a defined update moment.

Key Takeaways

  • An active-high D latch follows D for the entire time C is high.
  • When C becomes low, the latch holds the last accepted value.
  • The D input supplies complementary set and reset commands.
  • An input pulse can pass through during transparency.

1.3 Sampling with a D flip-flop

A D flip-flop samples D at an active clock edge and holds that sample between edges. A positive-edge device samples on a 0-to-1 clock transition; a negative-edge device samples on a 1-to-0 transition. The clock symbol has a triangle, with a preceding bubble for falling-edge triggering.

Capture once per cycle

The characteristic equation is

Q(t+1)=D.

D is evaluated at the active edge. A later D change does not pass through to Q during the same cycle. In real hardware Q responds after a clock-to-Q delay; ideal traces omit this delay.

One positive-edge construction uses two D latches in series. The master is transparent while the clock is low, and the slave is transparent while it is high. During the low phase, the master follows D and the slave holds the old Q. At the rising edge, the master closes on D and the slave opens onto that captured value. Changes at the external D input during the high phase cannot pass the closed master.

Storage elementWhen it accepts DBehavior between sampling moments
Active-high D latchThroughout the high enable levelFollows D while open
Positive-edge D flip-flopAt each rising edgeHolds the sample
Compare the same waveform

Let the rising edges occur at 10, 20 and 30 ns. D is high from 3 to 12 ns, low from 12 to 22 ns, high from 22 to 24 ns and low afterward. Starting at Q = 0, the samples are 1, 0 and 0. Q is therefore high from 10 to 20 ns and low after 20 ns.

The 22–24 ns pulse is missed because it contains no rising edge. An active-high D latch would pass that pulse during its high-enable interval. Calling both devices “storage” does not make their timing interchangeable.

Reset, preset and enable

An asynchronous clear forces Q to 0 without waiting for an edge. An asynchronous preset forces Q to 1. These direct controls override normal sampling and are often active-low. Check their input bubbles. They can establish a known starting state at power-up.

A synchronous reset waits for the active edge. For an active-high reset that takes priority over D, the data-path logic can be

Din=D reset′.

An enable chooses whether to load or hold at the edge. A multiplexer before D selects new data when EN = 1 and feedback Q when EN = 0:

Din=EN⋅D+EN′⋅Q.

For example, if Q = 1, D = 0 and EN = 0 at a rising edge, the feedback input supplies 1 and the bit holds. At a later edge with EN = 1, it loads 0.

Use this data-path enable to control updates. A plain AND gate in the clock line can delay one device's clock and produce an unintended edge if the enable rises while the clock is high. Several flip-flops on one clock store a multi-bit state; their outputs, often A and B, are the circuit's state variables. Each evaluates its input from the old state at the shared edge.

Key Takeaways

  • A clock triangle marks edge triggering; a bubble marks a falling edge.
  • A D flip-flop loads D at its active edge.
  • Opposite-phase master and slave latches prevent direct transparency.
  • Asynchronous clear and preset act without a clock edge.
  • Synchronous reset and enable act at active edges.
  • A data-path multiplexer provides load-or-hold behavior.

1.4 Hold, set, reset and toggle

Different flip-flop types express different update rules. A characteristic table predicts the next stored bit from the present bit and the inputs. A characteristic equation writes that same behavior as a Boolean function.

The JK rule

An edge-triggered JK flip-flop has four commands:

JKAction at the edge
00Hold Q
10Set Q to 1
01Reset Q to 0
11Toggle Q

Its characteristic equation is

Q(t+1)=JQ′+K′Q.

With Q = 0, the first term gives J. With Q = 1, the second gives K'. For J = K = 1, these cases give next values 1 and 0 respectively: the bit is complemented. The same input pair is invalid on an active-high SR latch, so always identify the device before using a table.

Start at Q = 0 and apply JK = 10, 00, 11, 11, 01 at successive rising edges. The actions are set, hold, toggle, toggle and reset. The stored values after the edges are 1, 1, 0, 1 and 0. A hold preserves the result of the preceding edge, including when that result is 1.

The T rule

A T flip-flop has one command input: T = 0 holds and T = 1 toggles. Its equation is

Q(t+1)=T⊕Q=TQ′+T′Q.

From Q = 0, the sequence T = 1, 1, 0, 1 produces Q = 1, 0, 0, 1. T = 1 does not mean “store 1”; it means “change the stored bit.” If T stays 1, two clock edges complete one output cycle. A 10 MHz clock therefore produces a 5 MHz square wave at Q.

Build the behavior with D storage

A D flip-flop stores whatever its input logic computes. Feeding it the characteristic equation implements the desired type:

Desired behaviorLogic before a D flip-flop
JKD=JQ′+K′Q
TD=T⊕Q

You can also tie J = K = T on a JK flip-flop to obtain T behavior. To obtain D behavior from JK, connect J = D and K = D'. When D = 1 the device sets; when D = 0 it resets. D storage with surrounding logic is common in integrated circuits and FPGAs, while JK and T equations can make hand designs convenient when state bits often hold or toggle.

Prediction and design use opposite directions

A characteristic table answers, “What next state results from these inputs?” An excitation table answers, “What inputs produce this desired transition?” Use the first for analyzing an existing circuit and the second for deriving a circuit from a state table.

The edge-triggered requirement still matters. A level-sensitive JK latch with J = K = 1 could toggle repeatedly while enabled. The clock edge gives the intended JK or T update exactly one opportunity per cycle.

Key Takeaways

  • JK = 00 holds, 10 sets, 01 resets and 11 toggles.
  • The JK equation is Q(t+1)=JQ′+K′Q.
  • T = 1 complements the present bit; T = 0 holds it.
  • D input logic can implement JK or T behavior.
  • Characteristic tables predict behavior; excitation tables select inputs.
2

Give signals time to settle

A shared clock makes state updates orderly only when data arrives at the right time. The slowest path must finish before the next edge, and the fastest path must not disturb the value still being captured at the current edge. Use these two checks to find clock speed and diagnose timing errors, then account for unequal clock arrival times and inputs that have no fixed relationship to the receiving clock.

2.1 Clock cycles and synchronous paths

A clock is a periodic signal that controls when flip-flops sample. Its period Tc is the time between matching active edges, and its frequency is the number of cycles per second:

f=1Tc.

A 250 MHz clock has a 4 ns period. A 500 ps period corresponds to 2 GHz. Use 1 ns=10−9 s and 1 ps=10−12 s when converting. The duty cycle is the fraction of a period for which the clock is high. A 50% duty cycle divides a period evenly between high and low levels; it does not create two rising edges per period.

What happens during a cycle

At an active edge, the state flip-flops sample their input values. Their outputs then become the new present state. Between edges, combinational logic uses that state and the external inputs to compute the values for the next edge.

The circuit has three functional parts:

  • The state storage holds the current state bits.
  • The next-state logic computes the flip-flop inputs from the present state and inputs.
  • The output logic computes outputs from the state alone, or from the state and inputs.

Write Q(t) for the current state bit and Q(t+1) for its value after the next active edge. The symbols Q+, Q* and Q_next are other common names for the next value. These labels count update steps, not seconds.

Break feedback with clocked storage

The synchronous design rules give a circuit a predictable structure:

  1. Each element is clocked storage or combinational logic.
  2. At least one element stores state.
  3. All state storage receives the same clock.
  4. Every cyclic path passes through clocked storage.

Trace a feedback path from Q through the next-state logic back to a flip-flop input. It can affect the next update, but the flip-flop stops the new input from immediately changing Q again. This gives the logic almost a full cycle to settle and lets timing be checked from one flip-flop to the next.

A combinational feedback loop has no such boundary. Three inverters, each with 10 ps delay, can form a ring oscillator. A transition makes one trip around the loop in 30 ps and a complete oscillation takes approximately 2×3×10=60 ps. An even-inversion loop can hold a value as an unclocked latch. Neither is a substitute for a defined edge-to-edge state path.

Keep the clock and data roles separate

Use a flip-flop enable to hold a value while keeping the common clock. Gating the clock with ordinary logic changes its delay and can generate unintended edges. A push button or another clock domain also introduces a signal that can change at any point in a cycle. It needs synchronization before ordinary synchronous logic relies on it. The shared clock controls the receiving flip-flops; it cannot force an unrelated input to respect their sampling window.

Key Takeaways

  • Clock frequency is the reciprocal of period.
  • Duty cycle describes the high fraction of a period.
  • Next-state logic computes between active edges.
  • Every synchronous feedback cycle passes through clocked storage.

2.2 Check the longest and shortest paths

A flip-flop needs a stable input around its sampling edge. Setup time is the required stable interval before the edge; hold time is the required interval after it. Together they form the sampling aperture. A timing check must protect both sides.

Distinguish maximum and minimum delays
SymbolMeaning
tpcqLatest time Q settles after a clock edge
tccqEarliest time Q may start changing after an edge
tpdLongest combinational-path delay
tcdShortest combinational-path delay

The longest logic path is the critical path. Propagation delays protect late arrival; contamination delays protect early arrival. Using the maximum delay in a hold calculation misses the very path most likely to cause the problem.

Setup: arrive before the next edge

One flip-flop launches data after an edge. The data then crosses the logic and must settle at the receiver before its next edge:

Tc≥tpcq+tpd+tsetup.

Equivalently, the logic has a budget tpd≤Tc−(tpcq+tsetup). Clock-to-Q plus setup is the sequencing overhead. It consumes part of each cycle even if the logic is very fast.

Take tpcq=80 ps, tpd=370 ps and tsetup=50 ps. The minimum period is

80+370+50=500 ps.

Thus fmax=1/(500 ps)=2 GHz for setup. A shorter period risks sampling before the new data is ready.

Hold: protect the current edge

The receiver must retain the old input long enough after the same edge that launches the new value. The earliest possible new arrival must satisfy

tccq+tcd≥thold.

With tccq=30 ps, tcd=25 ps and thold=60 ps, the earliest arrival is 55 ps. It is 5 ps too early. The shortest logic path needs at least 60−30=30 ps of contamination delay.

This circuit has a setup limit of 2 GHz but still has a hold violation. Meeting the setup period does not guarantee correct operation. A hold violation can cause the wrong value or metastability; it does not force failure on every edge.

Choose a repair that addresses the path
ViolationUseful repairs
SetupIncrease the period, shorten the critical path or use faster storage
HoldAdd delay to the short path or use a smaller hold-time requirement

The clock period is absent from the hold inequality, so slowing the clock cannot repair that violation. Adding buffers can help hold but also increase the longest delay; recheck setup afterward. With a direct flip-flop connection, tcd=0, so the requirement is tccq≥thold.

An external input must meet the first receiving flip-flop's setup and hold times too. A circuit output appears after clock-to-Q and its output-logic delay; a Mealy output also has an input-to-output logic path.

Key Takeaways

  • Setup uses maximum delays and the next receiving edge.
  • Hold uses minimum delays and the same receiving edge.
  • The setup-limited period is tpcq+tpd+tsetup.
  • Hold requires tccq+tcd≥thold.
  • A slower clock fixes setup margin but cannot fix hold.
  • A delay added for hold must also be checked against setup.

2.3 Skew and inputs that arrive between clocks

A shared clock does not arrive everywhere at exactly the same time. Wires and buffers introduce clock skew, a difference in arrival time between launching and receiving flip-flops. An unrelated external input introduces a different problem: its timing is not controlled by the receiving clock at all.

Budget for worst-case skew

Let tskew be the nonnegative worst-case magnitude to cover either clock-arrival direction. The conservative constraints are

Tc≥tpcq+tpd+tsetup+tskew, tccq+tcd≥thold+tskew.

An early receiving edge shortens the setup budget. A late receiving edge extends the hold window into the arriving new data. These are different worst cases; one particular signed skew does not hurt both checks in the same way.

With the 80 ps clock-to-Q, 370 ps logic and 50 ps setup path, a 20 ps skew budget raises the minimum period to 520 ps. The setup-limited maximum frequency is about 1.92 GHz. For a 60 ps hold requirement and 30 ps minimum clock-to-Q delay, the shortest path now needs 60+20−30=50 ps. A 25 ps path is 25 ps short.

Why an asynchronous input can go metastable

A button, sensor or different clock domain can change its signal inside the sampling aperture. The receiving flip-flop may become metastable, remaining between valid logic levels before settling to 0 or 1. Either final value is possible, and there is no fixed upper bound on the settling time. The chance of still being unresolved falls approximately as e−t/τ, where τ is a device time constant.

A two-flip-flop synchronizer places two D flip-flops in series on the receiving clock, with no logic between them. The first may go metastable; the second samples it a cycle later, allowing almost a full period for resolution. The synchronized signal is delayed by about one to two cycles. A third stage can reduce the remaining risk further. Independent one-bit synchronizers cannot preserve a multi-bit word: different bits may be accepted on different edges.

Interpret the reliability model

A common model is

MTBF=etr/τT0fclkfdata.

MTBF is mean time between synchronization failures, not a guaranteed failure-free lifetime. Here tr is available resolution time, T0 a device window constant, fclk the receiving frequency and fdata the input-change rate. More resolution time improves reliability exponentially; higher event rates reduce MTBF when the other quantities stay fixed.

For fclk=500 MHz, fdata=1 MHz, τ=50 ps, T0=100 ps and available tr=1.9 ns, the exponent is 38 and the denominator is 50000 per second. MTBF is about 6.4×1011 s, roughly 20 thousand years. The simplified 2 ns period minus 100 ps setup budget gives that 1.9 ns value. If inserted logic leaves only 500 ps, the exponent falls to 10 and MTBF becomes about 0.44 s. Keeping the interstage path short preserves resolution time.

Key Takeaways

  • Worst-case skew consumes both setup and hold margin.
  • A sampling-window violation can cause metastability.
  • A synchronizer gives the first stage time to resolve.
  • Use the receiving clock for both synchronization stages.
  • More resolution time increases MTBF exponentially.
  • Separate one-bit synchronizers cannot preserve multi-bit consistency.
3

Read a circuit as a sequence of states

A circuit diagram tells you how gates and storage are connected; a state table tells you how the circuit behaves over time. Name the stored bits, derive their update rules, and evaluate every present-state and input combination. Then draw the same information as a diagram and trace a sequence of inputs. D, JK and T circuits use different input rules, but all can be described by the same kinds of state tables and diagrams.

3.1 From D input logic to a state table

Analysis starts with a given circuit and predicts its behavior. The flip-flop outputs are its state variables. The input logic, next-state logic and output logic must be kept distinct, even when some of their equations look alike.

Read the equations in a fixed order
  1. Name the state bits, inputs and outputs.
  2. Read the combinational logic feeding each flip-flop input.
  3. Apply the flip-flop's characteristic equation to obtain the next-state equations.
  4. Read the output equation.
  5. Evaluate every state-and-input combination.

For D storage, the third step is particularly simple: the next bit equals its D input. Consider state bits A and B, input x and output y:

DA=Ax+Bx′,DB=A′x,y=AB′.

Then A(t+1)=Ax+Bx′ and B(t+1)=A′x. The output equation still uses present A and B. It does not use A(t+1) and B(t+1).

Work one row completely

Take present AB = 01 and x = 0. The first state bit has

DA=0⋅0+1⋅1=1.

The second has

DB=1⋅0=0.

The next state is therefore 10. The present output is y=0⋅0=0. After the edge, once the new state and output logic settle, state 10 has output 1. Writing 1 in the present row's output column would shift the output by a cycle.

Fill the complete table

A compact table has one row per state and separate next-state columns for each input.

Present ABNext AB, x = 0Next AB, x = 1Present y
0000010
0110010
1000101
1110100

For x = 0, the equations reduce to next A = B and next B = 0. This fills the second column directly. For x = 1, next A = A and next B = A', which fills the third column. Checking both simplified input cases is a quick way to find a swapped bit or missing complement.

With m state bits and n binary inputs, the expanded table has 2m+n rows. Two state bits and one input require eight rows; three bits and two inputs require 32. The compact table above contains the same eight state-and-input cases in four rows.

Keep outputs and possible states explicit

Because y depends only on state, one output column per state is enough: this is Moore behavior. An output such as y=Ax′ depends on x too and needs an output for each state-and-input case: this is Mealy behavior.

Keep AB in the same order throughout: 10 means A = 1 and B = 0. Include state 11 even if normal operation never enters it. Without a known reset, the circuit may start there, and the input equations still determine what it does. For JK and T storage, a gate-input value is a command; it must first pass through the characteristic rule before becoming a next-state bit.

Key Takeaways

  • State variables are the flip-flop outputs.
  • D input equations directly give the next-state bits.
  • Evaluate outputs from present state and current inputs.
  • An expanded table has 2m+n state-and-input rows.
  • Keep state-bit order fixed and include every code.

3.2 Draw arrows and trace cycles

A state diagram gives a visual route through the same cases as a state table. Each circle represents a state, and each arrow represents a possible transition at an active edge. The input label tells you which arrow to follow.

Put outputs in the right place
MachineCircle labelArrow label
MooreState name/outputInput
MealyState nameInput/output

For a Moore circle labeled “10/1”, 10 is the state code and 1 is its output. For a Mealy arrow labeled “1/0”, input 1 produces output 0 on that transition. The slash does not name a source state and destination state.

With one binary input, every state needs a route for 0 and a route for 1. Two routes can share an arrow if they have the same destination and applicable output. A self-loop is still a transition: it loads the same state again.

Convert a table to arrows

Use the circuit DA=Ax+Bx′, DB=A′x and y=AB′. Draw four Moore circles: 00/0, 01/0, 10/1 and 11/0. Add these arrows:

  • From 00: x = 0 returns to 00; x = 1 goes to 01.
  • From 01: x = 0 goes to 10; x = 1 returns to 01.
  • From 10: x = 0 goes to 00; x = 1 returns to 10.
  • From 11: either input goes to 10.

No arrow enters 11. Starting from 00, no input sequence reaches it. If the circuit starts in 11, however, its next edge takes it to 10. Reachability is always judged from a specified starting state.

Trace one input at a time

Start in 00 and apply inputs 1, 1, 0, 1, 0, 0. Define a cycle's present state and Moore output before the edge that accepts that cycle's input.

CyclePresent statexPresent yState after edge
1001001
2011001
3010010
4101110
5100100
6000000

Carry each row's final state into the next row's present-state column. Do not update A first and then use that new A to calculate B: both flip-flops sample from the same old state.

Read the behavior in words

From reset 00, a run of one or more 1s takes the circuit to 01. The 0 that ends that run takes it to 10, where the output is 1. State 10 persists while x is 1 and returns to 00 on a 0. This description summarizes the routes without attaching a separate meaning to every bit code.

In an ideal timing diagram, state changes occur at the active edge. Physical changes follow clock-to-Q delay. A Moore output depends only on state, but combinational decoding can briefly glitch while several state bits change at unequal times. Its settled value remains fixed while the state remains fixed; an input change alone cannot change it.

Key Takeaways

  • Each table case becomes a state-diagram transition.
  • A Moore output belongs to a state; a Mealy output belongs to an input-and-state case.
  • Trace from a named start and carry the new state to the next cycle.
  • All next-state bits use the same present-state values.
  • Decoded Moore outputs can glitch briefly during a state change.

3.3 Apply the JK or T rule before updating

The output of a gate feeding J or T is not a next-state bit. It is a command to the flip-flop. To analyze the circuit, first evaluate that command from the present state and then apply the device's characteristic rule.

Two equivalent methods

You can add intermediate columns for J, K or T and use the characteristic table in each row. Alternatively, substitute the input equations into the characteristic equation and simplify. The row method makes hold and toggle actions visible; algebra is useful for compact expressions.

For state bit A, the rules are

A(t+1)=JAA′+KA′A

and

A(t+1)=TA⊕A.

Notice the complement on K in the JK equation. K = 1 enables resetting a stored 1, so the term that preserves a 1 must use K'.

Analyze a JK circuit

Let JA=B, KA=Bx′, JB=x′ and KB=Ax. In present state 11 with x = 0:

  • A receives J = 1 and K = 1, so it toggles from 1 to 0.
  • B receives J = 1 and K = 0, so it stays at the set value 1.

The next state is 01. Both input pairs were evaluated from the original state 11.

Present ABNext AB, x = 0Next AB, x = 1
000100
011111
101110
110110

Substitution gives the same result:

A(t+1)=BA′+(Bx′)′A=A′B+AB′+Ax, B(t+1)=x′B′+(Ax)′B=x′+A′B.

Check the 11, x = 0 row in these expressions: next A is 0 and next B is 1. A row-by-row check after simplification can catch a lost complement.

Analyze a T circuit

Now let TA=Bx and TB=x′+A. Then

A(t+1)=A⊕Bx,B(t+1)=B⊕(x′+A).
Present ABNext AB, x = 0Next AB, x = 1
000100
010011
101111
111000

In state 11 with x = 1, both T inputs are 1, so both stored bits toggle and the next state is 00. Setting both next bits to 1 would treat the T commands as data values and give the wrong result.

Once the table is correct, draw its state diagram exactly as for D storage. The table describes observable state transitions, independent of how the storage commands were implemented. A designer can therefore implement the same table using D, JK or T flip-flops, with different logic at their inputs.

Key Takeaways

  • JK and T inputs must pass through their characteristic rules.
  • Evaluate all flip-flop commands from the old state.
  • T = 1 toggles either present value.
  • The complement on K is essential in JQ′+K′Q.
4

Design a finite state machine

A state machine begins with a decision about what the circuit must remember. Give each state a clear meaning, specify every input case, and choose where the outputs belong. Then merge states with identical future behavior, assign bit codes, and derive the flip-flop inputs. The finished design must match the intended input sequences, start in a defined state, and behave acceptably if its storage ever contains an unused code.

4.1 Moore and Mealy output timing

A finite state machine, or FSM, has a finite set of states, inputs, outputs, a next-state rule, an output rule and a reset state. Its hardware combines state flip-flops with next-state and output logic. Moore and Mealy machines differ in what can determine an output.

FeatureMooreMealy
Output depends onPresent statePresent state and inputs
Diagram output labelInside a stateOn an input-labeled arrow
Input responseThrough a state updateCan occur within the current cycle

A Moore output settles after a state change. Combinational decoding may glitch briefly during that transition, but changing an input alone cannot change its settled value. A Mealy output can respond during the cycle as an input changes, including producing input-caused glitches. Its intended value can be sampled before the active edge or passed through a flip-flop.

Detect the serial pattern 101

Suppose x supplies one bit each cycle and matches may overlap. A Mealy detector needs three states:

  • S0: no useful beginning of 101 has been seen.
  • S1: the useful ending is 1.
  • S2: the useful ending is 10.
Present statex = 0: next/outputx = 1: next/output
S0S0/0S1/0
S1S2/0S1/0
S2S0/0S1/1

The final 1 produces the detection output while the machine is still in S2. Returning to S1 preserves that final bit as the start of another match.

A Moore detector needs a fourth state S3, meaning “101 just seen,” with output 1. S0, S1 and S2 have output 0. Its next states for inputs 0 and 1 are respectively: S0 → S0, S1; S1 → S2, S1; S2 → S0, S3; S3 → S2, S1.

State which cycle an output belongs to

Let each cycle's state be the state before its accepting edge. For inputs 0, 1, 0, 1, 0, 1, 1, 0, 1, the Mealy output is 1 in cycles 4, 6 and 9. The Moore machine enters S3 after each corresponding edge, so its output is 1 in cycles 5, 7 and 10. The extra state lets the output belong to stored state instead of the incoming final bit.

A Mealy implementation often uses fewer states, but this is a design tradeoff, not a requirement for every FSM. Moore is useful for controls that should not react directly to input changes; Mealy is useful when same-cycle response or state count matters.

Convert while keeping output placement clear

To convert Mealy to Moore, split a destination state when incoming transitions require different output values. Each copy has one state output. To convert Moore to Mealy with destination-output timing, place each destination state's output on its incoming arrows. Account for the initial Moore output separately. Under the cycle convention above, detection is observed in the Mealy input cycle and in the following Moore state cycle; matching state names alone does not establish matching timing.

Key Takeaways

  • Moore outputs depend only on present state.
  • Mealy outputs can depend directly on current inputs.
  • A Mealy detector can report a match before its accepting edge.
  • A Moore detector reports through the state entered after that edge.
  • Conversion must preserve output values and their timing convention.

4.2 Give every state a meaning

A word description says what the machine must do. A state diagram says exactly what it remembers and how that memory changes. Start by listing the inputs and outputs, choosing Moore or Mealy output placement, and naming the reset state.

Store only relevant history

Describe each state in one sentence. For a 101 detector, “the last useful ending is 10” tells you what future input can complete a match. A name such as S2 alone tells you nothing about the required arrows.

Two histories need separate states only if some future input sequence requires different output behavior. The machine need not remember every bit ever received. It remembers enough to decide what to do next.

For a sequence detector, update to the longest ending of the received bits that is also a beginning of the target pattern. In the 101 detector, receiving 1 in S1 gives the ending “11”. Its longest useful suffix is “1”, so stay in S1. Receiving 0 in S2 gives “100”, with no useful suffix, so return to S0.

Preserve overlap when required

From S2, input 1 completes 101. An overlapping Mealy detector outputs 1 and goes to S1 because the final 1 may begin the next match. A non-overlapping detector outputs 1 and goes to S0, starting again with no saved prefix.

For the input sequence 0, 1, 0, 1, 0, 1, 1, 0, 1, overlapping matches finish in cycles 4, 6 and 9. Non-overlapping matches finish in cycles 4 and 9. The cycle-6 match shares a bit with the cycle-4 match. Overlap must therefore be part of the specification before the detection arrow is chosen.

Resetting on every mismatch is a different error. On 1, 1, 0, 1, a detector must retain S1 after the second 1. Throwing away that partial match would miss the final 101.

Specify simultaneous inputs

Consider a Moore turnstile with inputs coin and push. LOCKED has output lock = 1; UNLOCKED has lock = 0. In LOCKED, a coin unlocks it. In UNLOCKED, a push locks it.

StateConditionNext state
LOCKEDcoin = 0, either push valueLOCKED
LOCKEDcoin = 1, either push valueUNLOCKED
UNLOCKEDpush = 0, either coin valueUNLOCKED
UNLOCKEDpush = 1, either coin valueLOCKED

These rules settle coin = push = 1: coin decides from LOCKED, while push decides from UNLOCKED. A specification that names only separate coin and push events leaves that case unanswered.

Audit the diagram before encoding

For every state, the outgoing conditions must cover every input combination exactly once. With two binary inputs, check 00, 01, 10 and 11. Conditions may combine cases, but must leave no gap and make no contradictory overlap.

Assign outputs in the chosen Moore or Mealy position. Add reset to establish the starting state, then test long runs, mismatches, back-to-back events and overlap cases. Without reset, storage may power up in an unintended state even if every normal arrow is correct.

Key Takeaways

  • A state records the past information needed for future behavior.
  • Retain the longest suffix that can still begin a sequence match.
  • Overlapping detection reuses useful bits from a completed match.
  • Every input combination needs exactly one transition from every state.
  • Simultaneous events and reset behavior belong in the specification.

4.3 Merge states with the same future behavior

Two states are equivalent when every possible future input sequence produces the same output sequence from either one. Matching the current output is necessary but insufficient: later outputs must match too.

Begin with outputs and successor pairs

For each input, equivalent states must give the same output and move to the same state or to equivalent states. Row matching finds the simplest case: identical outputs and identical named next states in two table rows. Merge one into the other, rename it throughout the table, and check again.

Row matching can miss a pair whose successor names differ even though the successors are equivalent. An implication table checks those dependencies explicitly.

  1. Make one cell for each unordered pair of states.
  2. Cross out pairs whose outputs differ for any input.
  3. For each remaining pair, record the successor pairs that must be equivalent.
  4. Cross out a pair if any of its required pairs has been crossed out. Repeat until no new pair is removed.
  5. Merge the pairs that remain equivalent.
Reduce a five-state Mealy machine

Each entry below is next state/output.

Statex = 0x = 1
aa/0b/0
bc/0b/0
ca/0d/1
de/0d/0
ea/0d/1

First compare outputs. States c and e give output 1 for x = 1; a, b and d give 0. Cross out (a,c), (a,e), (b,c), (b,e), (c,d) and (d,e).

Now test the remaining pairs. Pair (a,b) requires (a,c) under x = 0, so remove it. Pair (a,d) requires (a,e), so remove it. Pair (b,d) requires (c,e) under x = 0 and itself under x = 1. Pair (c,e) has identical successors. Neither of these two pairs is contradicted, so both survive.

The classes are {a}, {b,d} and {c,e}. Rename d as b and e as c. The reduced table is a: a/0, b/0; b: c/0, b/0; c: a/0, b/1. It has the behavior of the three-state Mealy 101 detector.

Use partitions as an alternative

Group states by their output behavior: {a,b,d} and {c,e}. Within each group, compare the destination groups for each input. State a goes to the first group on x = 0, while b and d go to the second. Split a away. No further split is needed, giving {a}, {b,d}, {c,e}.

Judge the saving

Minimum-width binary storage uses three bits for both seven states and five states. Reducing five states to four crosses a power-of-two boundary and saves one flip-flop. In one-hot storage, every removed state saves one flip-flop. Logic size may also improve, but must be checked after encoding.

An unreachable state is different: no input sequence from reset enters it. It can be removed when describing operation from reset, whether or not it is equivalent to another state. Equivalence compares future behavior; reachability asks how the state can be entered.

Key Takeaways

  • Equivalent states match every future output sequence.
  • Implication tables propagate distinctions through successor pairs.
  • Partition refinement repeatedly splits groups by successor behavior.
  • Binary storage savings depend on crossing a power-of-two boundary.
  • Unreachable-state removal and equivalent-state merging are separate operations.

4.4 Choose bit codes for the states

State assignment gives each state a unique storage code. It preserves the required behavior but changes the Boolean functions that implement it. A useful assignment balances storage cost, logic size and timing.

Compare the storage choices
EncodingHow states are representedFlip-flops for n states
Minimum-width binaryDistinct binary numbers⌈log⁡2n⌉
Minimum-width GrayCodes chosen for one-bit differences along a sequence⌈log⁡2n⌉
One-hotOne dedicated bit is 1 per valid staten

Three or four states need two binary bits, five to eight need three, and nine need four. Gray ordering can reduce the number of bits changing along a chosen sequence, but a branching FSM cannot generally make every arrow a one-bit change. One-hot uses more storage and often simpler next-state decoding, which can be useful in FPGAs.

Compare actual equations

For the Moore 101 detector, assign S0 = 00, S1 = 01, S2 = 10 and S3 = 11. With present bits A and B:

DA=AB′x+Bx′,DB=x,y=AB.

Count variable occurrences as literals: five in the first equation, one in the second and two in the output, for eight total.

Now use the Gray-order assignment S0 = 00, S1 = 01, S2 = 11 and S3 = 10. The equations become

DA=A′Bx′+AB′x′+ABx, DB=A′B+A′x+AB′,y=AB′.

These contain 17 literals. The Gray order gives adjacent codes along the listed state sequence, yet produces more logic for this transition structure. Compare derived equations instead of choosing by the encoding's name.

Read one-hot equations from incoming arrows

Let S0 through S3 also name four one-hot bits. For each destination bit, OR the conditions on arrows entering that state:

DS0=x′(S0+S2), DS1=x(S0+S1+S3), DS2=x′(S1+S3),DS3=xS2.

The output is y=S3. Reset must set S0 to 1 and every other bit to 0. Clearing all four bits does not select any valid state.

Check unused codes

Three binary states on two bits leave one unused code. Four one-hot states on four bits leave 24−4=12 unused codes. Treating them as don't cares can simplify the maps, but the resulting circuit still does something when such a code occurs. Evaluate that behavior after minimization.

For hand assignments, try adjacent codes for states sharing a next state under an input, for destinations of one state, and for states sharing outputs. These choices can group 1s in Karnaugh maps. Compare two or three candidates: fewer flip-flops can come with wider logic, while extra one-hot storage can shorten the logic path.

Key Takeaways

  • Minimum-width binary or Gray storage needs ⌈log⁡2n⌉ bits.
  • One-hot assigns one flip-flop to each state.
  • State assignment changes logic cost without changing required behavior.
  • One-hot next-state equations collect incoming transition conditions.
  • Unused storage codes require an explicit behavior check.

4.5 Derive inputs and verify the finished circuit

A state table specifies desired transitions. To build it, choose flip-flop inputs that produce each transition, minimize their logic, and check the resulting circuit. Keep one variable order throughout; here state codes use AB and map rows use ABx.

Work backward with an excitation table
Q → next QDJKT
0 → 000X0
0 → 111X1
1 → 00X11
1 → 11X00

X means either input value works for that transition. For 0 → 1, J must be 1, while K may be 0 (set) or 1 (toggle). D simply equals the desired next bit. T indicates whether that bit changes:

D=Q(t+1),T=Q(t)⊕Q(t+1).

Do this separately for each state bit and each row. For ABx = 010 in the binary Moore 101 detector, next AB = 10. A changes 0 → 1, so J_A = 1 and K_A = X. B changes 1 → 0, so J_B = X and K_B = 1.

Derive and compare implementations

Use S0 = 00, S1 = 01, S2 = 10, S3 = 11. The next-state pairs for x = 0 then x = 1 are 00: 00, 01; 01: 10, 01; 10: 00, 11; 11: 10, 01. D_A is 1 in rows 010, 101 and 110, so map grouping gives

DA=AB′x+Bx′,DB=x,y=AB.

This needs two D flip-flops, three AND gates including output decoding, one OR gate and an inverter for x'. A complemented B output supplies B'.

The same table with JK storage minimizes to

JA=Bx′,KA=B′x′+Bx,JB=x,KB=x′.

With T storage it gives

TA=A′Bx′+AB′x′+ABx,TB=B⊕x.

The D equations are simplest here. A different machine with many hold or toggle transitions may favor JK or T. The characteristic rule predicts a response to given inputs; the excitation table selects inputs for an already chosen response.

Test what minimization leaves unspecified

A Mealy 101 detector uses S0 = 00, S1 = 01 and S2 = 10, leaving 11 unused. Taking that code as a don't care gives

DA=Bx′,DB=x,y=Ax.

From 11, x = 0 leads to 10 and x = 1 leads to 01. The circuit returns to valid state space in one edge, so it is self-correcting. Yet at 11 with x = 1, y is 1: recovery does not prevent a false output before recovery. If that is unacceptable, prescribe a safe next state and output for 11 before minimization. Reset establishes the intended start; it does not define behavior after a later disturbance. Unused states that only lead to one another cause lockout.

Close the design loop

The full route is specification, diagram, table, reduction, assignment, flip-flop choice, input and output equations, circuit, then verification. Compare equation-based traces against the diagram, including reset, partial matches, overlaps and unused codes. From 00, inputs 0, 1, 0, 1, 0, 1, 1, 0, 1 must produce Mealy detections in cycles 4, 6 and 9. Check timing as well as the Boolean transitions before accepting the hardware.

Key Takeaways

  • Excitation tables map desired bit transitions to required inputs.
  • D equals the next bit; T equals present XOR next.
  • JK excitation don't cares can simplify its input logic.
  • Derive output equations as well as flip-flop inputs.
  • Self-correction does not guarantee safe outputs during recovery.
  • Verify normal sequences, reset, unused codes and timing.

Synchronous Sequential Logic examples

4 Walkthroughs

1

Follow a bit through storage

16 steps
Trace feedback, transparent intervals and clock-edge updates, then apply the JK and T commands.
  1. 1
    IntroductionGive the circuit a memory

    A combinational circuit responds to its current inputs. A sequential circuit also stores a state, so an identical input can produce a different response after a different history. A push-on, push-off button illustrates this: each press is the same event, but the lamp alternates between on and off. We will first hold one bit with feedback, then control when that bit may change.

  2. 2
    ExplanationTwo stable values

    Two inverters connected in a loop support two stable arrangements: Q = 0 with its complement 1, or Q = 1 with its complement 0. Each output feeds back the value needed to sustain the other. This bistable loop remembers a bit while power remains on. To choose which value it stores, add set and reset control inputs; two cross-coupled NOR gates form the active-high SR latch.

  3. 3
    ExampleSet, hold and reset

    For a NOR SR latch, SR = 10 sets Q to 1, 01 resets Q to 0, and 00 holds its previous value. Starting with Q = 0, the sequence 10, 00, 01 gives 1, 1, 0. The middle input pair has no active command, so feedback preserves the set value. SR = 11 is invalid: both outputs become 0, and releasing both inputs together leaves the final state dependent on gate delays.

  4. 4
    ChallengeRead an active-low command

    A NAND SR latch has active-low inputs S' and R'. It starts at Q = 0 and receives S'R' = 01, then 11. What final value does it hold?

    ---reveal---

    It holds Q = 1. The first pair asserts set because S' is low while R' is inactive. The second pair makes both commands inactive and holds that 1. The NOR hold pair 00 would be invalid for this NAND latch.

  5. 5
    ExplanationUse one data input

    A D latch forms its SR commands from data D and enable C:

    S=DC,R=D′C.

    While C = 0, both commands are inactive. While C = 1, D selects set or reset, excluding simultaneous assertion in the logic model. The latch is transparent throughout the enabled level: Q follows D. When the enable goes low, Q holds the last accepted value.

  6. 6
    ExampleDraw the open interval

    Take an ideal active-high D latch, initially Q = 0. Enable is high from 5 to 12 ns. D rises at 7 ns and falls at 10 ns. Q stays low until 7 ns, follows D high from 7 to 10 ns, and returns low at 10 ns. Closing at 12 ns stores 0. The rising enable edge is not the only update opportunity: the input changes inside the open interval matter too.

  7. 7
    ChallengeCapture the value at closing

    An ideal active-high D latch is open from 3 to 8 ns. D rises at 6 ns and falls at 11 ns. It starts with Q = 0. What is Q at 9 ns, and why?

    ---reveal---

    Q = 1. The rise at 6 ns passes through while the latch is open, and closing at 8 ns stores that 1. The later D fall at 11 ns occurs while it is closed, so it cannot change Q until the latch is enabled again.

  8. 8
    ExplanationMake the update an edge

    A positive-edge D flip-flop samples D once at each rising clock edge and holds the sample between edges. Its clock symbol has a triangle; a bubble before the triangle would select falling edges. If rising edges occur at 10, 20 and 30 ns, changes between those instants do not directly update Q. Real output changes follow a clock-to-Q delay; ideal traces leave that delay out.

  9. 9
    ConnectionClose the master before passing data

    Two opposite-phase latches can form a positive-edge D flip-flop. While the clock is low, the master follows D and the slave holds Q. At the rising edge, the master closes on the sample and the slave opens onto that stored value. During the high phase the closed master blocks later D changes. The pair prevents a transparent path from external D all the way to Q.

  10. 10
    ExplanationChoose load or hold

    A data-path multiplexer gives a D flip-flop an enable:

    Din=EN⋅D+EN′⋅Q.

    At an edge, EN = 1 loads D; EN = 0 selects feedback Q and holds the bit. Keep the shared clock running. An ordinary AND gate in its path can create an unintended clock edge when enable rises while the clock is already high. A synchronous reset also acts at an edge; asynchronous clear acts without waiting.

  11. 11
    ChallengeA pulse between samples

    A positive-edge D flip-flop starts at 0. Rising edges occur at 6 and 16 ns; D is high only from 9 to 12 ns. What value is stored after 16 ns?

    ---reveal---

    It stores 0. D is low at both sampling edges, so the intervening pulse is never captured. An active-high latch open across 9–12 ns would pass the pulse; an edge-triggered device does not follow D throughout the clock-high interval.

  12. 12
    ExplanationRead JK as four commands

    JK inputs select hold, set, reset or toggle at the active edge: 00 holds, 10 sets, 01 resets and 11 complements the bit. The characteristic equation is

    Q(t+1)=JQ′+K′Q.

    With Q = 0, the next value is J. With Q = 1, it is K'. Thus J = K = 1 turns either stored value into its opposite. It is a valid JK command, even though simultaneous set and reset is invalid on an SR latch.

  13. 13
    ConnectionBuild T behavior from D

    A T flip-flop holds for T = 0 and toggles for T = 1. Its rule is

    Q(t+1)=T⊕Q.

    Feed that XOR expression into a D flip-flop to obtain the same behavior. T can also drive both J and K of a JK device. Holding T high produces one Q transition per active clock edge, so two clock periods complete one output cycle. The output frequency is half the input clock frequency.

  14. 14
    ChallengeFollow two toggles and a hold

    A T flip-flop starts with Q = 1. Its T inputs at four active edges are 1, 0, 1, 1. What values follow the edges?

    ---reveal---

    The stored values are 0, 0, 1, 0. The first 1 toggles down, the 0 holds, and the final two 1s toggle up then down. Writing the T sequence itself as Q would mistake a change command for a data value.

  15. 15
    ChallengeConnect enable with toggle

    A D flip-flop uses Din=EN⋅Q′+EN′⋅Q. Starting at Q = 0, EN is 1, 0, 1 at three active edges. What happens?

    ---reveal---

    The bit becomes 1, holds 1, then becomes 0. An asserted enable selects the complement of the stored bit, while an inactive enable selects its unchanged value. This is T behavior implemented with D storage and a load-or-hold multiplexer.

  16. 16
    RecapMatch the command to the storage

    To trace storage, first identify its active level or edge. Use feedback to carry the old value through a hold interval. For D, load the data; for JK, apply its four commands; for T, compare hold with toggle. Keep asynchronous preset and clear separate from clocked sampling. The same logic expressions can implement different named behaviors around D storage.

2

Check a complete timing path

14 steps
Use maximum and minimum delays, add a skew budget, and explain how synchronization reduces metastability risk.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionProtect both sides of sampling
  2. 2
    ExplanationBuild a cycle budget
  3. 3
    ChallengeFind the period and high interval
  4. 4
    ExplanationName the four path delays
  5. 5
    ExampleAdd the setup intervals
  6. 6
    ExampleCheck the same-edge hold window
  7. 7
    ChallengeSelect a repair that passes both checks
  8. 8
    ExplanationCover the adverse skew direction
  9. 9
    ExampleRecheck after clock uncertainty
  10. 10
    ExplanationGive an uncertain bit time to settle
  11. 11
    Key InsightKeep the interstage path short
  12. 12
    ChallengePredict a reliability change
  13. 13
    ChallengeCheck the fastest clock claim
  14. 14
    RecapSeparate delay from uncertainty
3

Turn equations into a trace

12 steps
Build a state table, read its arrows, and apply characteristic rules when the storage is JK or T.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionEvaluate the old state first
  2. 2
    ExplanationRead a D circuit
  3. 3
    ExampleFill the four present-state cases
  4. 4
    ChallengeKeep the output on the correct side
  5. 5
    ExplanationConvert the table to a route
  6. 6
    ExampleRead behavior across several edges
  7. 7
    ChallengeCarry the state into the next row
  8. 8
    ExampleApply JK commands to old bits
  9. 9
    Key InsightDo not copy a T command
  10. 10
    ChallengeAnalyze a new T row
  11. 11
    ChallengeTrace beyond one command
  12. 12
    RecapUse three views of one behavior
4

Design and verify a pattern detector

20 steps
Build a complete FSM, reduce and encode its states, derive storage inputs and check unused codes.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionBegin with the memory the task needs
  2. 2
    ExplanationChoose the output dependency
  3. 3
    Key InsightKeep the cycle convention fixed
  4. 4
    ChallengePredict an input-only change
  5. 5
    ExplanationName the useful prefixes
  6. 6
    ChallengeTest a mismatch that preserves history
  7. 7
    TipMake every input case unique
  8. 8
    ExplanationTest future behavior, not state names
  9. 9
    ExampleReduce the expanded detector
  10. 10
    ChallengeUse a delayed distinction
  11. 11
    ExplanationAssign codes and count storage
  12. 12
    ExampleCompare the equations after assignment
  13. 13
    ChallengeBuild a one-hot input equation
  14. 14
    ExplanationTurn desired changes into inputs
  15. 15
    ExampleFill one excitation row
  16. 16
    ExampleRecover without making a false promise
  17. 17
    ChallengeChoose the correct excitation
  18. 18
    ChallengeTest an unused code from the equations
  19. 19
    TipVerify beyond a successful match
  20. 20
    RecapKeep behavior and implementation aligned

Synchronous Sequential Logic practice questions

50 Practice Questions in 5 sets

Set 1: Storage, clocks and state transitions10 Practice Questions

Question 1 of 10

A NOR SR latch is storing Q = 1. S and R are both 0. What value does Q hold?
  1. 0
  2. It alternates between 0 and 1.
  3. 1
  4. It is forced to an invalid level.
Show answerHide answer
Answer: C
The input pair SR = 00 is the hold command for a NOR latch, so feedback preserves Q = 1. Treating both low inputs as a reset confuses an inactive command pair with an asserted R input. Reset would require S = 0 and R = 1.

Question 2 of 10

An ideal active-high D latch starts at Q = 0. C is high from 6 to 11 ns. D rises at 8 ns and falls at 10 ns. When is Q high?
  1. From 8 to 10 ns
  2. From 6 to 8 ns
  3. From 8 to 11 ns
  4. From 11 ns until C next rises
Show answerHide answer
Answer: A
The latch is transparent throughout 6–11 ns, so Q follows both changes of D and is high only from 8 to 10 ns. Closing at 11 ns captures 0, because D has already fallen. Holding the earlier 1 until closure would incorrectly give the latch edge-triggered behavior.

Question 3 of 10

A positive-edge D flip-flop holds Q = 1. Its active-low asynchronous clear becomes 0 between clock edges. What happens to Q?
  1. It becomes 0 at the next rising edge.
  2. It stays 1 until D also becomes 0.
  3. It toggles at the next falling edge.
  4. It becomes 0 without waiting for an edge.
Show answerHide answer
Answer: D
An asserted asynchronous clear overrides normal D sampling and forces Q to 0 independently of the clock, after the device response delay. Waiting for the next rising edge describes a synchronous reset. The low clear input is asserted because this control is active-low.

Question 4 of 10

A JK flip-flop starts at Q = 1. At three rising edges its JK inputs are 11, 00, 10. What values are stored after those edges?
  1. 1, 1, 1
  2. 0, 0, 1
  3. 0, 1, 1
  4. 0, 0, 0
Show answerHide answer
Answer: B
JK = 11 toggles the initial 1 to 0, 00 holds that 0, and 10 sets the bit to 1. The middle value remains 0 because hold preserves the most recent state, not the initial state. Reading 11 as set would miss the first toggle.

Question 5 of 10

A clock has a period of 8 ns. What is its frequency?
  1. 8 MHz
  2. 125 MHz
  3. 250 MHz
  4. 1.25 GHz
Show answerHide answer
Answer: B
Frequency is the reciprocal of period: one divided by 8 × 10⁻⁹ s is 125 × 10⁶ cycles per second, or 125 MHz. A 250 MHz clock would have a 4 ns period. Counting the rising and falling transitions as separate cycles incorrectly doubles the frequency.

Question 6 of 10

A path has maximum clock-to-Q delay 65 ps, logic propagation delay 295 ps and setup time 40 ps. With zero skew, what is the setup-limited maximum frequency?
  1. 3.39 GHz
  2. 2.78 GHz
  3. 2.22 GHz
  4. 2.5 GHz
Show answerHide answer
Answer: D
The launch delay, longest logic delay and setup interval require a period of at least 65 + 295 + 40 = 400 ps. Its reciprocal is 2.5 GHz. Using only the 295 ps logic delay gives about 3.39 GHz and omits the time required by the two flip-flops.

Question 7 of 10

A D circuit has DA=B+x, DB=A⊕x and y=AB. For present AB = 10 and x = 0, what are the next state and present output?
  1. Next AB = 01; y = 0
  2. Next AB = 01; y = 1
  3. Next AB = 10; y = 0
  4. Next AB = 11; y = 1
Show answerHide answer
Answer: A
Using the present values gives D_A = 0 OR 0 = 0 and D_B = 1 XOR 0 = 1, so next AB is 01. The present output is A AND B = 1 AND 0 = 0. Updating one bit before calculating the other would mix values from two different cycles.

Question 8 of 10

A Moore machine resets to P. Its output is 1 only in R. For inputs 0 then 1, the next states are P: P,Q; Q: R,Q; R: P,R. Inputs 1,0,1,0,1 are applied. What are the outputs before each accepting edge, and the final state?
  1. Outputs 0,1,1,0,0; final Q
  2. Outputs 0,0,1,0,0; final R
  3. Outputs 0,0,1,1,0; final Q
  4. Outputs 0,0,1,1,0; final R
Show answerHide answer
Answer: C
The successive present states are P, Q, R, R, P, followed by final Q. Only the two cycles in R have output 1, giving 0,0,1,1,0. Reading each destination output before its transition shifts the high values one cycle too early.

Question 9 of 10

An FSM holds its state fixed while input x changes. Its output changes after the input-to-output logic delay. What output model does this demonstrate?
  1. Moore behavior
  2. An output determined only by reset
  3. Mealy behavior
  4. An output determined only by the clock
Show answerHide answer
Answer: C
A Mealy output may depend directly on the present input as well as the stored state, so it can change while state stays fixed. A Moore output depends only on state and therefore cannot respond to that input change alone. A brief Moore decoding glitch requires a state transition, which is absent here.

Question 10 of 10

An overlapping detector searches for 110. It currently remembers the suffix 11, then receives another 1. What suffix should its next state remember?
  1. 11
  2. 1
  3. 110
  4. No partial match
Show answerHide answer
Answer: A
The received ending is now 111, whose longest suffix that is also a prefix of 110 is 11. Retaining only 1 discards a useful bit and can delay or miss detection when 0 arrives next. A mismatch with the final target bit does not necessarily erase the partial match.
Set 2: Timing margins and complete circuit models10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A D flip-flop uses Din=EN⋅d+EN′⋅Q. Initially Q = 1. At two rising edges, (EN,d) is (0,0), then (1,0). What are the stored values after those edges?
  1. 0, then 0
  2. 1, then 0
  3. 1, then 1
  4. 0, then 1
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A zero-skew path has minimum clock-to-Q delay 22 ps, logic contamination delay 18 ps and hold time 48 ps. How much additional minimum path delay is required?
  1. 8 ps
  2. 26 ps
  3. 48 ps
  4. 40 ps
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A path has tpcq=70 ps, tpd=260 ps, tsetup=45 ps and worst-case skew magnitude 15 ps. What minimum period covers setup?
  1. 360 ps
  2. 375 ps
  3. 390 ps
  4. 345 ps
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

An expanded state table describes a circuit with three state flip-flops and one binary input. How many state-and-input rows does it have?
  1. 16
  2. 8
  3. 12
  4. 32
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A T circuit has TA=B+x and TB=Ax′. Present AB = 10 and x = 0. What is the next state?
  1. 01
  2. 10
  3. 11
  4. 00
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A Mealy table lists next/output for x = 0 then 1: U: W/0,V/0; V: Z/0,U/0; W: W/1,V/1; Z: Z/1,U/1. What are its equivalence classes?
  1. {U,W} and {V,Z}
  2. {U,V,W,Z}
  3. {U}, {V}, {W}, {Z}
  4. {U,V} and {W,Z}
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A six-state FSM uses a minimum-width binary encoding. How many flip-flops and unused codes does it have?
  1. 3 flip-flops; 3 unused codes
  2. 3 flip-flops; 2 unused codes
  3. 6 flip-flops; 2 unused codes
  4. 2 flip-flops; 0 unused codes
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A desired transition changes AB from 01 to 11. What T inputs produce it?
  1. T_A = 1, T_B = 1
  2. T_A = 1, T_B = 0
  3. T_A = 0, T_B = 1
  4. T_A = 0, T_B = 0
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A NAND SR latch has active-low inputs S' and R'. What input pair sets Q to 1?
  1. S' = 1, R' = 0
  2. S' = 1, R' = 1
  3. S' = 0, R' = 0
  4. S' = 0, R' = 1
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A three-state D FSM uses valid codes 00, 01 and 10; 11 is unused. Its minimized equations are DA=B, DB=A′x and y=AB. If it enters 11, what recovery and output behavior follows?
  1. It enters 00 for either x, and y is 0 before recovery.
  2. It remains in 11 for x = 1, with y = 1.
  3. It enters 10 for either x, and y is 0 before recovery.
  4. It enters 10 for either x, but y is 1 before recovery.
Show answerHide answer

Save this lesson to see this answer.

Set 3: State history, reduction and output timing10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

An ideal D latch has an active-low enable. It stores 0 while enable is 1. Enable falls to 0 at 4 ns; D rises at 6 ns; enable returns to 1 at 9 ns; D falls at 12 ns. What is Q at 13 ns?
  1. 1
  2. 0
  3. It follows the fall at 12 ns.
  4. It changes only when enable next falls.
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A T flip-flop is clocked at 24 MHz with T held at 1. What is the steady output frequency?
  1. 24 MHz
  2. 48 MHz
  3. 12 MHz
  4. 6 MHz
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A clock has a 10 ns period and is high for 3 ns in each period. What is its duty cycle?
  1. 70%
  2. 3%
  3. 33.3%
  4. 30%
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A synchronizer has an MTBF of M. Only its available resolution time increases by τln⁡4; device constants and both event rates stay fixed. What is the new MTBF?
  1. M/4
  2. 4M
  3. 2M
  4. M + 4
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A Moore FSM starts in A with y = 0. States B and C have outputs 0 and 1. Next states for inputs 0 then 1 are A: A,B; B: C,B; C: A,C. A trace after three accepting edges reads y = 0,1,1. What three-bit input sequence produced it?
  1. 110
  2. 101
  3. 011
  4. 100
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A JK circuit has JA=x, KA=B, JB=A′ and KB=x. Present AB = 01 and x = 1. What is its next state?
  1. 11
  2. 00
  3. 01
  4. 10
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A Moore machine starts in A/0. On input 1 it enters B/1. In a destination-output Mealy conversion, what label belongs on that A-to-B arrow?
  1. 1/0
  2. 0/1
  3. 1/1
  4. 0/0
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A non-overlapping Mealy detector reports pattern 011 and resets its partial-match memory after each report. It starts with no match. For input 0011011, in which cycles does it report?
  1. 4 and 7
  2. 3 and 6
  3. 4 only
  4. 3 and 7
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A Moore FSM has output 0 in P,Q,R and output 1 in S. For inputs 0 then 1: P→Q,P; Q→R,Q; R→S,R; S→S,S. What shortest input sequence distinguishes P from Q by their output traces?
  1. 00
  2. 0
  3. 1
  4. 01
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A four-state one-hot FSM has present-state bits P,Q,R,S and input x. The only arrows entering R are P on x = 1 and S on x = 0. What D equation loads R?
  1. DR=P+S
  2. DR=Px+Sx′
  3. DR=Px′+Sx
  4. DR=Rx
Show answerHide answer

Save this lesson to see this answer.

Set 4: Repair timing and distinguish machine behavior10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

For a desired transition AB = 10 to AB = 00, what JK excitation pairs are required for A and B? X means either value.
  1. JAKA=X1;JBKB=0X
  2. JAKA=1X;JBKB=0X
  3. JAKA=X1;JBKB=X0
  4. JAKA=X0;JBKB=0X
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A NOR SR latch receives S = R = 1. R then falls to 0 while S stays high long enough for the latch to settle, after which S also falls. What value is finally stored?
  1. Q = 0
  2. Q = 1
  3. Q toggles on each release.
  4. Q remains forced to 0 on both outputs.
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A flip-flop clock symbol has a triangle preceded by a bubble. On which clock transition does it normally sample data?
  1. The rising transition
  2. Throughout the low level
  3. The falling transition
  4. Throughout the high level
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A feedback path contains combinational gates but no storage. The proposed repair inserts a D flip-flop on that path, driven by the same clock as every other state flip-flop. Which synchronous design rule does this repair address?
  1. Every cyclic path must pass through clocked storage.
  2. Every loop must contain exactly one flip-flop.
  3. Every state flip-flop must have a data enable.
  4. Every internal signal needs a synchronizer.
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A zero-skew path has tpcq=55 ps, tpd=300 ps, tsetup=45 ps, tccq=20 ps, tcd=15 ps and thold=50 ps. A buffer adds 20 ps to both logic delays. Can the buffered path operate at a 450 ps period?
  1. No; setup needs 470 ps despite passing hold.
  2. No; setup passes but hold is still 15 ps short.
  3. Yes; setup needs 400 ps and hold has 20 ps margin.
  4. Yes; setup needs 420 ps and hold has 5 ps margin.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A path has tpcq=60 ps, tpd=250 ps, tsetup=40 ps, tccq=25 ps, tcd=25 ps, thold=45 ps and worst-case skew magnitude 10 ps. What minimum equal increase to both logic delays repairs hold, and what minimum period then satisfies setup?
  1. Add 0 ps; period at least 360 ps.
  2. Add 10 ps; period at least 370 ps.
  3. Add 5 ps; period at least 355 ps.
  4. Add 5 ps; period at least 365 ps.
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A D circuit has DA=A⊕x, DB=A+B and y=AB′. It starts in AB = 00 and accepts x = 1,0,1. What are the three next states and the outputs before those edges?
  1. Next 11,11,01; outputs 0,0,0
  2. Next 10,10,00; outputs 0,1,1
  3. Next 10,11,01; outputs 0,1,0
  4. Next 10,11,01; outputs 1,0,0
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A controller has inputs start and stop. In IDLE its outgoing conditions are “start = 1” and “stop = 1”. What is wrong with these conditions as a complete transition specification?
  1. They leave 11 uncovered and overlap at 00.
  2. They leave 00 uncovered and overlap at 11.
  3. They cover each combination exactly once.
  4. They only fail when start changes between edges.
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A Moore machine starts in A. A and B output 0; C outputs 1; D outputs 0. For inputs 0 then 1: A→B,C; B→B,C; C→A,C; D→D,D. After removing states unreachable from A and merging equivalent states, how many states and minimum-width binary flip-flops remain?
  1. 2 states; 1 flip-flop
  2. 3 states; 2 flip-flops
  3. 2 states; 2 flip-flops
  4. 1 state; 0 flip-flops
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A seven-state FSM is reduced to five states. How does the required flip-flop count change for minimum-width binary and for one-hot encoding?
  1. Binary falls from 3 to 2; one-hot falls from 7 to 5.
  2. Binary stays at 3; one-hot stays at 7.
  3. Binary stays at 3; one-hot falls from 7 to 5.
  4. Binary falls from 7 to 5; one-hot stays at 3.
Show answerHide answer

Save this lesson to see this answer.

Set 5: Verify unfamiliar sequential designs10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

An ideal active-high D latch and a positive-edge D flip-flop start at Q = 0 and share C. C is high during 4–9 ns and 14–19 ns. D is high during 2–6 ns and 16–18 ns, low otherwise. When do their outputs differ?
  1. 4–6 ns and 14–16 ns
  2. 6–9 ns and 18–19 ns
  3. 9–14 ns and 16–19 ns
  4. 6–14 ns and 16–18 ns
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A D flip-flop is wired with D=uQ′+u′Q. Starting from Q = 1, inputs u = 1,0,1 are applied at successive active edges. What stored values follow?
  1. 1,0,1
  2. 0,0,1
  3. 0,1,0
  4. 1,1,0
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Two zero-skew paths share flip-flops with tpcq=50 ps, tccq=20 ps, tsetup=30 ps and thold=45 ps. Path P has logic delays (maximum, minimum) = (310,40) ps; path R has (90,10) ps. What setup-limited period and hold diagnosis apply?
  1. 170 ps; R violates hold by 15 ps.
  2. 390 ps; P violates hold by 5 ps.
  3. 390 ps; R violates hold by 15 ps.
  4. 390 ps; both paths satisfy hold.
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A two-stage synchronizer has MTBF M. A redesign doubles the input-change rate and shortens available resolution time by τln⁡3, with clock frequency and device constants fixed. What is the new MTBF?
  1. M/6
  2. 3M/2
  3. M/3
  4. 2M/3
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A Mealy state diagram has an arrow from M to N labeled “0/1”. What does the label mean?
  1. Input 0 gives output 1 on the M-to-N transition.
  2. Input 1 gives output 0 on the M-to-N transition.
  3. State M has code 0 and state N has code 1.
  4. Output 0 is followed by output 1 at the next edge.
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A JK circuit has JA=B, KA=x, JB=x′ and KB=A. It starts at AB = 01 and accepts inputs 0,1,0. What states follow the three edges?
  1. 11,01,11
  2. 10,00,01
  3. 11,00,01
  4. 11,00,11
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

Two FSMs detect the same sampled pattern. The Mealy output is 1 in cycle 8 before the edge accepting the final bit. The Moore design marks detection in a state entered by that edge. Using pre-edge cycle outputs for both, when is its report visible?
  1. Cycle 8
  2. Cycle 9
  3. Cycle 7
  4. Cycle 10
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

An overlapping Mealy detector for 010 currently remembers 01 and receives 0. What output and next remembered suffix are required?
  1. Output 1; remember nothing
  2. Output 0; remember 0
  3. Output 1; remember 01
  4. Output 1; remember 0
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A designer fills Karnaugh maps from the desired state transition table of a T-based FSM. What value belongs in T_A for a row where A = 1 and next A = 1?
  1. 1
  2. A'
  3. A + next A
  4. 0
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A D FSM uses valid codes 00,01,10 and unused 11. Its equations are DA=A, DB=A+B and y=B. Reset forces 00. What happens if a disturbance puts it in 11 after reset has been released?
  1. It recovers to 00 at the next edge and outputs 0.
  2. It remains in 11 for every input and outputs 1.
  3. It enters 10 at the next edge and outputs 1.
  4. It alternates between 11 and 00 and outputs 1,0.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

81 Key Terms, each with its definition

A

Active-low input
An active-low input asserts its named function at logic 0 and leaves that function inactive at logic 1, often marked by a bubble.
The NAND latch’s set input is asserted when S' is low and its reset input remains high.
Asynchronous clear
An asynchronous clear directly forces the stored output to 0 when asserted, without waiting for an active clock edge.
A low-going active-low clear resets Q even while the clock remains at a constant level.
Asynchronous input
An asynchronous input has no fixed sampling-time relationship to the receiving clock and may change inside its stability window.
A push button can change close to a receiving clock edge even when the receiving logic is synchronous.

B

Binary encoding
A minimum-width binary encoding represents n states with distinct codes in the smallest bit width, ⌈log⁡2n⌉.
Six states need three bits, leaving two of the eight available codes unused.
Bistable element
A bistable element has two stable states and can retain either one while powered, providing the physical basis for storing one bit.
The stable output pairs of two cross-coupled inverters are 0,1 and 1,0.

C

Characteristic equation
A characteristic equation expresses a flip-flop’s next state as a Boolean function of its current inputs and stored bit.
The T equation Q(t+1)=T⊕Q combines a command with the present value.
Characteristic table
A characteristic table lists the next stored bit for every combination of a flip-flop’s control inputs and present value.
In a JK analysis row, evaluate J and K before applying hold, set, reset or toggle.
Circuit analysis
Circuit analysis derives a circuit’s state transitions and outputs from its existing storage connections and combinational equations.
A designer can analyze a T circuit row by row before drawing its equivalent state diagram.
Clock
A clock is a periodic control signal whose active transitions set the sampling moments of a synchronous circuit’s storage elements.
Flip-flops on a common positive-edge clock all accept their next-state inputs at rising edges.
Clock domain
A clock domain is a group of synchronous storage elements controlled by the same clock, with timing checked relative to that clock.
A signal crossing from an unrelated clock domain can arrive at any phase of the receiving clock.
Clock frequency
The clock frequency is the number of complete clock cycles per second, measured in hertz and equal to one divided by period.
A 500 ps clock period corresponds to a frequency of 2 GHz after converting time to seconds.
Clock period
The clock period is the time between successive matching active clock edges, equal to the reciprocal of clock frequency.
A 250 MHz clock repeats its rising edge every 4 ns, regardless of the stored state.
Clock skew
Clock skew is the difference in arrival times of the same clock edge at different storage elements, caused by clock-path delays.
An earlier receiving edge reduces the time a launched value has to meet the next setup window.
Clock-to-Q contamination delay
The clock-to-Q contamination delay is the minimum time after an active clock edge before the flip-flop output may begin changing.
Hold analysis starts with the earliest launch, not the latest time at which Q settles.
Clock-to-Q propagation delay
The clock-to-Q propagation delay is the maximum time after an active edge for a flip-flop output to reach its settled value.
A setup path must budget the launch flip-flop’s delay before data begins its trip through logic.
Combinational circuit
A combinational circuit computes outputs from its present inputs without storing a state that represents earlier inputs.
An AND gate produces the same result for the same input pair each time it is evaluated.
Contamination delay
The contamination delay of logic is the earliest time an input change can begin affecting its output along the fastest path.
A short logic route can threaten hold even when the longest route meets the setup budget.
Critical path
The critical path is the combinational path with the greatest propagation delay in the timing check, limiting the available clock speed.
Of two parallel logic paths, the 370 ps path contributes more to setup demand than the 90 ps path.

D

D flip-flop
A D flip-flop samples its data input at an active clock edge and holds that sampled bit between edges, subject to direct controls.
A pulse that starts and ends between rising edges may never appear at a positive-edge device’s Q.
D latch
A D latch stores a data bit, following D during its enabled level and holding the last accepted value while the enable is inactive.
An active-high D latch passes a D pulse that occurs entirely within its high-enable interval.
Don’t care
A don’t care is a table entry allowed to be either 0 or 1 during logic minimization because both choices satisfy the specified case.
K is a don’t care for a JK 0-to-1 transition because either set or toggle produces 1.
Duty cycle
The duty cycle is the fraction of a complete period for which a clock is high, commonly expressed as a percentage.
A clock high for 2 ns in a 4 ns period has a 50% duty cycle.

E

Edge triggering
Edge triggering makes a storage element sample on a specified clock transition instead of remaining transparent during a level.
A triangle at the clock pin distinguishes an edge-triggered symbol from a level-sensitive latch.
Enable
An enable is a control input that permits data acceptance when asserted and causes the storage element to hold when inactive.
C = 0 closes an active-high D latch even if the data input continues changing.
Equivalent states
Equivalent states produce identical output sequences for every possible future input sequence and can be merged without changing behavior.
Two states may be equivalent even when their table rows use different but equivalent successor names.
Excitation table
An excitation table lists the flip-flop inputs that can produce each desired transition from the present stored bit to the next one.
A JK 0-to-1 transition fixes J at 1 and allows either K value.

F

Feedback
Feedback returns an output signal to an earlier point in the circuit, allowing stored values to sustain themselves in a latch.
In a cross-coupled gate pair, each gate receives the other gate’s output as an input.
Finite state machine
A finite state machine has a finite set of states, input and output functions, transition rules and a designated starting state.
A pattern detector’s states summarize only the received history needed to recognize future matches.
Flip-flop input equation
A flip-flop input equation describes the logic driving a storage input, such as D, J, K or T, from present state and inputs.
A T input expression must still be combined with the stored bit to calculate its next value.

G

Gray encoding
A Gray encoding selects codes differing by one bit for consecutive states along a chosen sequence, reducing changes on those transitions.
A branching transition that skips the chosen sequence may still change several state bits.

H

Hold time
The hold time is the minimum interval for which sampled data must remain stable after the flip-flop’s active clock edge.
A new input arriving 55 ps after an edge violates a receiving hold requirement of 60 ps.

I

Implication table
An implication table tracks state pairs and the successor pairs whose equivalence they require, eliminating pairs that become distinguishable.
If pair P,Q requires R,S and R,S has different outputs, P,Q must also be crossed out.

J

JK flip-flop
A JK flip-flop holds, sets, resets or toggles its stored bit at the active edge according to the pair of J and K inputs.
With Q = 1 and JK = 11, the next active edge complements the stored value to 0.

K

Karnaugh-map minimization
Karnaugh-map minimization groups adjacent Boolean cases to simplify flip-flop input and output expressions while preserving specified values.
The state-code variable order must agree with map labels before any group is translated into an equation.

L

Level sensitivity
Level sensitivity means a storage element responds throughout an active control level, rather than only at its transition.
The high interval of an active-high latch is an entire acceptance window, not one sampling instant.
Lockout
Lockout is behavior in which unused states transition only among unused states, preventing normal operation from resuming through those paths.
An unused self-loop traps the machine even when its reset state was valid earlier.

M

Master-slave construction
A master-slave construction connects two opposite-phase latches so one captures data and the other passes the captured value to Q.
For positive-edge D storage, the master closes at the rising edge as the slave opens.
Mealy machine
A Mealy machine determines its outputs from the present stored state and current inputs, allowing input-dependent output changes.
A Mealy detector can assert its output while the final input bit is present, before the accepting edge.
Mean time between failures
The mean time between failures, or MTBF, is a statistical reliability measure giving the average interval between modeled failure events.
A large synchronizer MTBF indicates rare failures, not a guaranteed failure-free lifetime.
Metastability
Metastability is an unsettled storage condition in which an output can remain between valid logic levels before resolving to 0 or 1.
A setup violation can delay a clean output transition beyond the normal clock-to-Q bound.
Moore machine
A Moore machine determines its outputs only from the present stored state, with one output value for each state.
A Moore detector’s output becomes high after the machine enters its dedicated match state.

N

Next-state equation
A next-state equation gives a state bit’s value after the next active edge as a function of the present state and inputs.
For D storage, A(t+1)=DA directly connects the input expression to the next bit.
Next-state logic
The next-state logic is combinational circuitry that computes the storage inputs needed for the next update from state and inputs.
The expression DA=Ax+Bx′ specifies logic feeding the D input of state bit A.
Non-overlapping detection
Non-overlapping detection restarts partial-match memory after a match, so no input bit belongs to two accepted matches.
After detecting the first 101 in 10101, a non-overlapping detector cannot reuse its final 1.

O

One-hot encoding
A one-hot encoding assigns one flip-flop to each state, with exactly one bit high in every valid state code.
The next bit for a state ORs the conditions on the arrows entering that state.
Opaque phase
The opaque phase is the interval in which a latch blocks input changes and preserves the data value captured when it closed.
A latch closed on 1 continues to output 1 when D falls during the following disabled interval.
Output decoding
Output decoding is the combinational calculation of output values from state bits, possibly also using inputs in a Mealy circuit.
Unequal state-bit arrival times can briefly glitch a decoded Moore output during a transition.
Output equation
An output equation computes a circuit output from present state alone or from present state and current external inputs.
The output y=AB′ is high in present state 10 even before the next state is loaded.
Overlapping detection
Overlapping detection allows bits of a completed sequence match to serve as the beginning of a later match in the input stream.
The 101 matches in 10101 share the middle 1, so an overlapping detector reports both.

P

Partial match
A partial match is the useful suffix of received input that agrees with a beginning of the target sequence but has not completed it.
After 110 in a 101 detector, the useful suffix is 10, which can be completed by a final 1.
Partition refinement
Partition refinement repeatedly splits output-compatible state groups when members lead to different groups for the same input.
A stable partition gives the equivalent-state classes after no successor behavior forces another split.
Positive edge
A positive edge is a clock transition from logic 0 to logic 1, used as the sampling event by a positive-edge-triggered flip-flop.
D is captured at the rising edge of each clock cycle when a positive-edge device is enabled.
Present-state evaluation
Present-state evaluation computes all storage commands from the same old state before any next-state bit replaces its current value.
Updating A early and then using it to compute B describes a different circuit from simultaneous sampling.
Preset
A preset directly forces a flip-flop’s stored output to 1; an asynchronous preset acts independently of the active clock edge.
An asserted asynchronous preset can establish Q = 1 before the next normal sampling edge.

R

Reset state
The reset state is the designated state loaded by reset so that an FSM begins operation with a defined stored history.
A one-hot reset sets the starting state bit and clears every other state bit.
Resolution time
The resolution time is the interval available for a metastable storage output to settle before a later stage relies on its value.
Logic inserted between synchronizer stages consumes some of the settling interval before capture.
Row matching
Row matching finds equivalent states by identifying identical output and next-state entries in their rows, then repeating after merges.
Matching outputs alone is insufficient when the successor states have different future behavior.

S

Sampling aperture
The sampling aperture is the protected data-stability window around an active edge, spanning the setup and hold intervals.
An unrelated input that changes inside this window can leave the receiving flip-flop metastable.
Self-correcting FSM
A self-correcting FSM returns from an unused state code to valid operation through its implemented transitions, without a new reset.
A one-edge recovery can still expose a false detection output before the correcting edge.
Sequencing overhead
The sequencing overhead is the part of a cycle consumed by maximum clock-to-Q delay plus receiving setup time before budgeting logic.
With 80 ps clock-to-Q and 50 ps setup, a 500 ps period leaves 370 ps for logic.
Sequential circuit
A sequential circuit stores state, allowing its behavior to depend on relevant past inputs as well as the inputs present now.
A push-on, push-off control responds differently to a press depending on whether the lamp is already on.
Setup time
The setup time is the minimum interval for which data must already be stable before a flip-flop’s active sampling edge.
Data arriving 20 ps before an edge fails a 50 ps setup requirement even if it stays stable afterward.
SR latch
An SR latch stores one bit using cross-coupled gates and set and reset inputs that can select or preserve its stored value.
A NOR SR latch sets Q on SR = 10, then holds that 1 when the commands return to 00.
State
The state is the collection of values currently stored in a circuit’s memory elements, representing its relevant input history.
Two flip-flops holding A = 1 and B = 0 give the circuit the present state code 10.
State assignment
A state assignment gives every named state a distinct bit code, changing implementation logic while preserving its required behavior.
Two assignments for the same detector can use equal storage but different numbers of logic literals.
State diagram
A state diagram represents states as nodes and input-controlled transitions as directed arrows, with output labels as appropriate.
A self-loop on input 1 shows that the same state is loaded again when that input is accepted.
State reduction
State reduction removes redundant states by merging equivalent behavior, preserving the machine’s specified responses to input sequences.
Reducing five states to four can save one minimum-width binary state bit.
State table
A state table lists next states and outputs for the possible combinations of present state and inputs of a sequential circuit.
Two state bits and one binary input give eight cases in an expanded state table.
State variable
A state variable is a flip-flop output bit used to encode the circuit’s present stored state, often named A, B or Q.
The code AB = 10 means present A is 1 and present B is 0 before evaluating next-state logic.
Switch debouncing
Switch debouncing suppresses extra signal changes caused by a mechanical contact repeatedly opening and closing before it settles.
A changeover switch and NAND latch can produce one output change despite several contact bounces.
Synchronizer
A synchronizer reduces the risk from asynchronous sampling by allowing a first storage stage time to settle before later sampling.
Two D flip-flops on the receiving clock provide a common one-bit synchronization chain.
Synchronous circuit
A synchronous circuit stores state on a common clock and places clocked storage on every feedback cycle between combinational paths.
A flip-flop breaks the feedback route so the next-state logic computes between state updates.
Synchronous reset
A synchronous reset selects the reset value at the active clock edge, using the clocked update path rather than acting immediately.
Asserting synchronous reset between edges leaves the old Q until the next active edge.

T

T flip-flop
A T flip-flop holds its state when T is 0 and complements its state when T is 1 at the active clock edge.
A permanently high T input makes Q complete one output cycle for every two clock cycles.
Toggle
To toggle a stored bit is to replace it with its complement, changing 0 to 1 or 1 to 0 at the update event.
JK = 11 toggles either starting value, while JK = 10 always selects the set value.
Trace
A trace records how states and outputs develop from a specified starting state under a sequence of input values.
Carry each next state into the following row before evaluating the next input in a trace.
Transition
A transition is an update from the present state to the next state under a particular input condition at an active edge.
The arrow from S1 to S2 on 0 records one input case of a serial pattern detector.
Transparency
Transparency is the phase in which an enabled latch allows data-input changes to propagate to its output after internal delay.
A rise in D halfway through a transparent interval can make Q rise before the enable changes.

U

Unreachable state
An unreachable state cannot be entered by any input sequence starting from the chosen reset state, even if its code exists in storage.
A state with no incoming arrows from the reset-reachable region can still matter after a disturbance.
Unused code
An unused code is a storage-bit combination that has no assigned valid state in the chosen FSM encoding.
Four one-hot states on four bits leave 12 of the 16 possible combinations unused.

V

Verification
Verification checks that implemented equations reproduce the required state and output behavior, including reset and unused-code cases.
A detector test includes mismatches and overlaps as well as a single successful pattern.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started