A flip-flop is a bistable multivibrator whose output is either a high or low voltage, a 1 or a 0. The output stays high or low until an input called a trigger is applied.
The basic flip-flop is the RS flip-flop. It is formed by two cross-coupled NOR or NAND gates . The RS flip-flop has two outputs, Q and
Q , and two controlling inputs, R (Reset) and S (Set). The outputs are always opposite or complementary: If Q = 1, then Q = 0, and vice-versa.
To understand the operation of the circuit, assume that the Q output, R input, and S input are all low. The low on the Q output is connected to one of the inputs of gate 2. The S input is low. The output of gate 2 is high. This high is coupled to the input of gate 1,
holding its output to a low. When the Q output is low, the flip-flop is said to be in the RESET state. It remains in this state indefinitely, until a high is applied to the S input of gate 2. When a high is applied to the S input of gate 2, the output of gate 2 becomes a low and is coupled to the input of gate 1. Because the R input of gate 1 is a low, the output changes to a high. The high is coupled back to the input of gate 2, ensuring that the
Q output remains a low. When the Q output is high, the flip-flop is said to be in the SET state. It remains in the SET state until a high is applied to the R input, causing the flip-flop to RESET.