FLIP-FLOPS

A "flip-flop", also known as a "latch", is a simple memory device. It has two possible states, and can be switched from one state to the other by applying input signals.

The simplest kind of flip-flop is the "set-reset" or "RS" latch [1]. This has two inputs called "set" and "reset". Applying a brief pulse to the "set" input flips the latch to one state, and a pulse to the "reset" input flips it to the other state.

It also has two outputs called "Q" and "Q-bar" [2]. These are complementary -- when one is high the other is low, and vice versa.

One way to build an RS latch is to use two cross-coupled NOR gates. This version has active-high inputs, meaning that a high pulse is required on an input to change the state. When both inputs are low, the latch retains its previous state.

If we use NAND gates instead, we get a latch with active-low inputs -- they are normally held high, and a low pulse causes the latch to change state.

Try building these two circuits and experiment with them to get a feel for how they work. Remember that you can change the input and output configurations in the "Lab" setup of your workbench if you want.

---
[1] Why "RS" and not "SR"? Beats me. Someone liked putting their acronyms in alphabetical order.
[2] Putting a bar over a signal name is one way of indicating negation. Sometimes a slash is used instead, e.g. "/Q".