A flip-flop is a digital circuit that has two stable states and is used to store state information. There are four main types of flip-flops: JK, D, T, and SR. The SR flip-flop has two inputs called set and reset that set the output to 1 or 0 respectively. SR flip-flops can also be clocked using NAND or NOR gates to synchronize the changing of states with a clock signal. One application of clocked SR flip-flops is in switch debouncing circuits to eliminate unwanted switching from mechanical switch bounce.