SR latch
An SR latch is the simplest memory: two NOR gates, each feeding the other. Press Set and its output Q turns on and stays on after you let go; press Reset and it turns off and stays off. Holding a value after the input that made it is gone is what memory is.
How it works
- 01
Each NOR's output is one of the other's inputs, so the pair holds itself in one of two states.
- 02
Set forces Q on. When you let go, the loop keeps it on.
- 03
Reset forces Q off, and the loop keeps it off.
- 04
Set and Reset together isn't allowed: it forces both outputs off, and what it remembers afterwards depends on which you let go of last.