Chips, Ahoy!211Experiment 22: Flipping and BouncingExperiment 22: Flipping and BouncingI mentioned in the previous experiment that “bounce” from the buttons in the circuit wouldn’t be a problem, because the buttons were activating 555 tim-ers that were wired in bistable, flip-flop mode. As soon as the timer receives the very first pulse, it flips into its new state and flops there, ignoring any ad-ditional noise in the circuit. So can we debounce a switch or a button using a flip-flop? And as some 74HCxx chips are available containing flip-flops, can we use them?The answers are yes, and yes, although it’s not quite as simple as it sounds.You will need:• 74HC02 logic chip containing 4 NOR gates. 74HC00 logic chip containing 4 NAND gates. Quantity: 1 of each.• SPDT switch. Quantity: 1.• LEDs, low-current. Quantity: 2.• 10K resistors and 1K resistors. Quantity: 2 of each.Assemble the components on your breadboard, following the schematic shown in Figure 4-98. When you apply power (through your regulated 5-volt supply), one of the LEDs should be lit. 74HC0210K5V DC Regulated10K1K1KFigure 4-98. A simple circuit to test the behavior of two NOR gates wired as a simple flip-flop that retains its state after an input pulse ceases.Now I want you to do something odd. Please disconnect the SPDT switch by taking hold of the wire that connects the positive power supply to the pole of the switch, and pulling the end of the wire out of the breadboard. When you do this, you may be surprised to find that the LED remains lit.Push the wire back into the breadboard, flip the switch, and the first LED should go out, while the other LED should become lit. Once again, pull out the wire, and once again, the LED should remain lit.Here’s the take-home message:• A flip-flop requires only an initial pulse. • After that, it ignores its input.