Flip flops are heart of digital electronics. Without this component modern digital electronics would have never reached the position where it is today. To make the next topic "555 timer" clearer, it would be good to cover a small introduction of flip flops here. They will be discussed in detail in "digital electronics" section.
Flip Flop is basically a memory device, one flip-flop can hold 1 bit information. That 1 bit can be either 0 or 1. 8 such flip-flops can hold 8 bits of information or 1 byte of information.
In early days when digital electronics was not so evolved, days when even transistor was not invented, people used to use "relays" as electronics switches for switching. Even whole telephone exchanges were built using such relays. One interesting fact about these relays is that they produce a typical "click" sound when the metal connectors inside them make a contact, and "clack" as they get apart.
When transistor got invented , these switches were replaced by transistor based switches and these transistor switches got their name from relay's "click clack" sound as "flip flop".
Schematically, a flip-flop can be represented as shown below. This is a S-R(set/reset) flip-flop. All other flip-flops i.e J-K flip-flop, D flip-flop and T flip-flop can be derived from S-R flip-flop.
Lets see how it works..
- To simplify, lets consider a flip-flop as 3 pin device for now, one output Q and two inputs S and R. S sets the Q and R resets the Q. There are two more pins to power this flip-flop with 5v, those are not shown in the image.
- Any momentarily logic-1 (5 volts) applied to S (set pin) will set the output of Q to high (logic-1).
- Logic-1 on Q will be latched, even if logic-1 from S set pin is removed now. This 1 bit will be latched until the device is powered off or the flip-flop is reset.
- Logic-1 on Q can be reseted to logic-0 (0 volts) by applying momentarily logic-1 to R reset pin.
- Q and Q (Q-bar) are outputs pins. Logic level on two pins Q and Q will ways complement to each other. When one will have 0, then other will have 1 and vice-versa. So basically a flip-flop is 4 pin device, 2 input and 2 output, but for simplicity of our initial understanding we treated as a 3 pin device.
* please note that here logic-1 means 5V DC, and logic-0 means 0V DC.
Because of this property of flip-flops to hold or latch output, these are very much used as memory component.