FA-89194 / Digital logic simulation / Member archive
J and K inputs swapped · case 04
Asserting J clears the flop and asserting K sets it.
Case contract
Input [kind, q0, ins] with one [a, b] pair per clock edge. jk (a=J, b=K): 00 hold, 10 set, 01 reset, 11 toggle. sr (a=S, b=R): 10 set, 01 reset, 00 hold, 11 is forbidden and makes q 'x'. t (a=T): 1 toggles, 0 holds, 'x' makes q 'x'. Toggling 'x' gives 'x'. Return q after each edge.
Why this case matters
Behavioural flip-flop primitives in gate-level libraries must reproduce characteristic tables, including unknown handling.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| jk toggles from known state | [0, 0, 1, 0, 1, 0, 1] | [1, 1, 0, 1, 0, 1, 0] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗