JK flip-flop: build and simulate it online
Hold, set, reset and toggle — on the clock edge.
Build the jk flip-flop in the free online simulator — it checks your circuit automatically.
What you need
- 3 logic switches labelled J, K, CLK
- 1 probes labelled Q
- 1 JK flip-flop
Step by step
- Inputs and outputs. From the Logic section of the library, drop digital inputs (0/1 boxes) or logic switches for the inputs, and digital outputs or probes for the outputs; give each its label in the inspector (the checker finds them by label). Switches J, K, CLK; Probe Q
- The flip-flop. Place a JK flip-flop and wire J, K, CLK and Q (leave PRE and CLR open).
- Prove it. The checker clocks it through set, hold, reset and two toggles. J = K = 1 toggles on every edge
Expected sequence
| # | inputs | clock | Q |
|---|---|---|---|
| 1 | J=1 K=0 | ↑ | 1 |
| 2 | J=0 K=0 | ↑ | 1 |
| 3 | J=0 K=1 | ↑ | 0 |
| 4 | J=1 K=1 | ↑ | 1 |
| 5 | J=1 K=1 | ↑ | 0 |
Frequently asked questions
How do you build a jk flip-flop?
Hold, set, reset and toggle — on the clock edge. In short: inputs and outputs, then the flip-flop, then prove it.
How does a jk flip-flop behave clock by clock?
It is checked over 5 steps: set, hold, reset, toggle, …. The table on this page shows the expected Q after each clock.
What parts do you need for a jk flip-flop?
1 JK flip-flop — plus logic switches for the inputs and probes for the outputs.
Can I simulate a jk flip-flop online for free?
Yes. Open it in the BitForBytes Embedded Lab, a free browser-based circuit and logic simulator: drag in the gates, wire them, and press "Check my circuit" — every clock cycle is simulated and marked for you. No download or sign-up needed.
Part of DSD 30 · JK flip-flop in the free BitForBytes digital system design course.