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
Check these values
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.
Your result
How it was worked out
How to use it
- 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.
- Read Q before and after each edge, what happened (set, reset, hold, toggle), and the waveform.
- Choose Counter or shift register to watch a counter count, with the in-between states of a ripple counter.
- 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.