Skip to main content

SRLatch

A set-reset latch made of two cross-coupled NAND gates, with active-low controls. Children: top (drives q) and bottom (drives qBar).
Releasing both controls from 0, 0 to 1, 1 in the same tick makes both gates toggle together forever. run() reports this with a StabilizationError instead of picking a winner. Release one control before the other.
See Sequential logic for a full walkthrough.