The CD4027 is a 16-pin (DIP-16) CMOS IC that contains two independent JK flip-flops. At the moment the clock input rises from 0 to 1, a JK flip-flop looks at its J and K inputs: if both are 0 it keeps its state, if J is 1 it sets the output to 1, if K is 1 it sets the output to 0, and if both are 1 it flips its state. Pins of one flip-flop: 1 Q, 2 inverted output, 3 clock, 4 reset, 5 K, 6 J, 7 set; the other one uses pins 9 to 15. The set and reset inputs are active at 1 and are tied to GND when they are not used. It runs from 3 to 15 V, so a 9V battery can power it directly; pin 16 is the positive supply and pin 8 is GND. Its output current is low, so drive an LED through a resistor of 1 kΩ or more, or through a transistor. Tie any unused inputs to GND. It is used in one-button on/off, divide-by-two and binary counter circuits.

