Toolvito

Calculates on this device. File exports run online.

Flip Flop Simulator

Choose a D, JK, T or SR flip-flop (or a D or SR latch), type its inputs for each clock step, and see Q after every edge with a waveform, the characteristic table and the excitation table. Run ripple and synchronous counters, ring and Johnson counters and shift registers, or build a circuit of up to 8 flip-flops whose inputs are Boolean expressions: you get the step-by-step trace, the state table and a VCD file for a waveform viewer.

Enter your values

D, T, JK and SR flip-flops and latches step by step, with the waveform.

Your values

More options

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

Run the circuit over a long stimulus file

Run the circuit over a long stimulus file

The circuit of Circuit of flip-flops above is used (press Simulate the circuit there first). Choose a stimulus file of up to 5,000,000 steps: a CSV with a column named after each input (0 or 1 in each row), or lines of bits. You get the whole trace as CSV and a VCD waveform.

Or drop the file here. Any type of file, 256 MB each at most.

    The simulations above run in your browser. When you use this box, the circuit of “Circuit of flip-flops” and the stimulus file you choose are sent to the Toolvito server. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    How to use it

    1. Choose One flip-flop or latch, pick the type and type the values of its inputs, one character for each clock step (such as 1101001100). Press Simulate.
    2. Read Q before and after each edge, what happened (set, reset, hold, toggle), and the waveform.
    3. Choose Counter or shift register to watch a counter count, with the in-between states of a ripple counter.
    4. Choose Circuit of flip-flops, give each flip-flop its input equations (such as Q0 AND X) and the input values, and save the waveform as VCD.

    The rules

    • D: Q takes D. T: Q toggles when T is 1. JK: 00 holds, 01 resets, 10 sets, 11 toggles. SR: 00 holds, 01 resets, 10 sets, 11 is not allowed (shown as X, unknown).
    • A latch follows its inputs while it is enabled; a flip-flop changes only at the active clock edge.
    • Preset and clear (active high here) act at once and win over the clock.
    • This is a logic-level simulation: gate delays, set-up and hold times, glitches and metastability are not modelled. For analogue behaviour use a circuit simulator such as LTspice.

    Related tools