๐ Latch & Flip-Flop Symbol Library
Eight devices, one reading system. Latch symbols show only data and enable pins; flip-flop symbols add a clock pin marked with the edge triangle (โท) โ the single visual cue that says "this device listens only at the clock transition." A bubble before the triangle would mean falling-edge triggering. Each card carries the device's characteristic table; red rows are forbidden.
| S | R | Q |
|---|---|---|
| 0 | 0 | hold |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | invalid |
| EN | S | R | Q |
|---|---|---|---|
| 0 | x | x | hold |
| 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | invalid |
| EN | D | Q |
|---|---|---|
| 0 | x | hold |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| S | R | Q next |
|---|---|---|
| 0 | 0 | hold |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | invalid |
| D | Q next |
|---|---|
| 0 | 0 |
| 1 | 1 |
| EN | D | Q next |
|---|---|---|
| 0 | x | hold |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| J | K | Q next |
|---|---|---|
| 0 | 0 | hold |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 1 | toggle |
| T | Q next |
|---|---|
| 0 | hold |
| 1 | toggle |
๐ Level vs. Edge: Two Paired Analogies
A latch is a window; a flip-flop is a camera. These two analogies are built as a matched pair โ same street, same cars, same one-bit question ("is a car there?") โ so the only thing that differs between them is when the answer gets recorded. That is exactly the difference between a latch and a flip-flop.
The One-Car Garage Door
You hold the opener button, and the door stays up as long as you hold it. While it's up, the garage's contents simply follow the driveway: a car pulls in โ occupied; it backs out โ empty; it pulls in again โ occupied. The garage is transparent. Release the button, the door comes down, and whatever is inside at that moment stays there, no matter what happens on the driveway afterward.
The danger is the open interval. If a neighbor noses in to turn around just as the door drops, the neighbor's car is what you've stored. Every glitch on the input during the window can end up as the answer.
Button released (EN=0) โ door down, contents frozen (hold)
The Red-Light Camera
A red-light camera doesn't care how long the light has been red or green. It fires once, at the instant the signal changes to red, and records one fact: was a car in the intersection at that instant? The photo is kept until the next change. Cars that crossed a second earlier, or roll through a second later, never appear in it.
Its only vulnerable moment is the flash itself. A car sitting exactly on the stop line is the camera's version of a setup/hold violation โ was it in or out? That ambiguous photo is the traffic-court equivalent of metastability.
Any other time โ camera blind (hold)
๐ Sequential Logic Lab โ Operation Simulator
All eight devices from the symbol library, live. The left side of the canvas shows the device with its current input and output states; the right side is a scrolling timing diagram recording everything you do. Toggle inputs with the buttons (or click the input pins on the canvas), pulse the clock manually to see edge-triggering, or switch on the auto-clock and watch behaviors like divide-by-2 draw themselves.
๐ก Input pins on the device symbol are clickable too.
Interactive Knowledge Check
Test your understanding with ten questions. Select your answers and click "Submit Answers" for your score and detailed feedback.
Please complete all questions to view your results.