Asynchronous clear 2026-10-24
A control that resets stored state independently of the clock edge. An active-low clear is asserted by a low signal; clocked sampling resumes after the clear is released.
Clock signal 2026-10-24
A recurring digital signal whose designated clock edge triggers a state update. A rising clock edge is the transition from the low level to the high level; a falling clock edge is the reverse.
Combinational logic 2026-10-25
A Boolean circuit whose current output depends only on its current input, with no stored state or feedback dependency. Its delay is bounded by the longest input-to-output path of logic gates. This differs from a synchronous sequential circuit, whose output can depend on state stored at earlier clock edges.
Debounced toggle switch 2026-10-25
A sampled toggle controller can reject short disturbances by requiring three consecutive high samples to toggle, and then three consecutive low samples before another high run is allowed to toggle. One four-bit synchronous sequential circuit stores output , an armed bit , and input history . Initially . SetThe two three-sample run detectors cannot assert simultaneously. A high run toggles once and clears ; only a complete low run rearms it. All right-hand sides use the old state, so the toggling event occurs at the third qualifying clock edge.
The controller has twelve distinguishable behaviours: for each , three armed states count trailing highs of lengths , and three disarmed states count trailing lows of lengths . The run lengths are distinguished by the number of further matching samples needed before a toggle or rearm. Armed and disarmed states are distinguished by an all-high continuation. Thus at least state bits are required, and the displayed design attains that bound.
D flip-flop 2026-10-24
At the active clock edge, . An asynchronous clear, when provided and asserted, takes precedence over this data-sampling rule.
Flip-flop 2026-10-24
A flip-flop stores one bit and updates it at a specified clock edge; an asynchronous clear can override that clocked update. Signal polarity is part of the specification, not something inferred from the name alone.
JK flip-flop 2026-10-24
At the active clock edge, the next state is : inputs hold, reset, set, and toggle. In particular, gives , whereas gives . The standard function table is illustrated by a positive-edge device in the [ref]. Its asynchronous reset is active high; another circuit may specify an active-low clear.
Moore machine 2026-10-25
A Moore machine is a finite-state machine whose output depends only on the current state. In a clocked implementation, a state entered at a clock edge determines the following period's output. Specifying an initial state is necessary to define startup behavior.
After asserting and releasing the active-low Start pulse, a valid sequence is , then , then , with each input held high through the relevant sampling interval. The first JK flip-flop has and is clocked by , so the rising clock edge of samples and sets . Once that output has settled, a rising clock edge of clocks the second JK flip-flop with , setting .
The essential conditions concern sampled levels: must be high at a rising clock edge of , and must then be high at a rising clock edge of . Separate edges with adequate setup and hold time avoid an ambiguous simultaneous transition.
The initial input levels do not initialize the stored bits. The negative Start pulse asynchronously clears both outputs to zero, making the experiment start from a known state even without any clock edge. Once Start is released, the circuit can recognize a fresh sequence. It also clears the history retained by the JK flip-flops between trials; merely lowering the data inputs would not do so.
With , a JK flip-flop obeys at its positive clock edge: holds its old state and sets it. Thus each original stage is a sticky record of a previously sampled high input until Start clears it. A D flip-flop instead obeys , so a later sample of zero can clear the output.
Connect each replacement D input where the corresponding J input was connected, preserving the clocks and asynchronous clear. The first valid sequence after Start still sets both outputs. Afterwards, let fall and apply another rising clock edge to . The D version clears ; the JK version retains . A subsequent rising clock edge of can therefore clear only in the D version. Neither circuit continuously tracks its data input between clock edges.
Connect the fourth JK flip-flop with and clock it from , retaining the source's positive-edge convention. Read the four-bit state as . Its state-transition diagram is a single cyclewith one input rising clock edge per arrow; the figure displays every state explicitly.
Each stage halves the preceding triggering frequency. is an ideal square wave with a 50-percent duty cycle at , with wave period and high and low intervals of . Its initial phase depends on the starting state. The figure chooses initial state and a first input rising clock edge at . Actual ripple propagation shifts edge times and creates intermediate transient codes; no device delays were supplied, so the waveform describes settled ideal logic.
Use a three-sample run detector. Just before clock edge , let two stored bits and hold the input values at edges and . Initialise both to zero. With input , definePrimes denote the next stored state, with all assignments simultaneous at the clock edge. The output is the logical conjunction of the present input and its two preceding samples. By induction on clock edges, the stated interpretation of is maintained, proving the required behaviour. Two bits of state suffice.
Store two bits: the output , initially zero, and an
armed bit , initially one. Define the synchronous sequential circuit byHere is exclusive or, and the input restriction excludes conflicting commands. The output is the current stored .When armed, a sampled toggles and clears . Further samples leave the output unchanged. A sampled sets without changing , allowing a later to toggle it again. The same clock edge cannot both rearm and trigger because are never simultaneously high. Thus the first toggles from zero to one, and subsequent toggles each require a new followed by a later .
Share the input-history bits of (a) between a high-run detector and a low-run detector. With the two preceding input samples, putThese detector outputs are mutually exclusive. Feed them into (b). An explicit four-bit synchronous sequential circuit, with initial state , isEvery right-hand side uses the old state and the current input. In particular, the run detectors' combinational outputs are sampled by the toggle module at that same edge; there is no extra pipeline stage.
The first three consecutive high samples make at the third edge, toggling and clearing . Continuing high input cannot toggle it again. Only three consecutive low samples can make and rearm it; interrupted low runs do not suffice. After rearming, a new three-sample high run produces the next toggle. This proves the debounced toggle switch behaviour, including rejection of short high and low disturbances.
The debounced toggle switch rejects interrupted runs, toggles on the third consecutive high sample, and rearms only on the third consecutive low sample; stored outputs are shown just after each clock edge
. Details. Setup and hold time 2026-10-24
Synchronous sequential circuit 2026-10-25
A synchronous sequential circuit stores a finite collection of bits , reads inputs , and updates all stored bits at each clock edge according to a specified next-state function . A combinational output is ; an output that is itself stored is included among the state bits. An initial state is part of a complete design. These equations provide a precise implementation-level description of a finite-state machine without requiring a particular gate drawing.
Three-sample run detector 2026-10-25
Store the two previous input bits in . At the next clock edge, use and update . The output is high exactly when the present input and previous two samples are all high. Replacing each input by its negation detects a three-sample low run. Both detectors can share the same two history bits, using and . With initial history zero, the high detector cannot trigger before three actual high samples have occurred.

