Flip-flop (electronics)
- In electronics and computing:
The Flip-flop or bistable is an electronic circuit which in its simplest form consists of two transistors connected in such a way that the circuit can be in one of two stable conditions. A trigger applied at an appropriate point can cause the circuit to flip from one state to the other. A trigger at another point can cause the circuit to flop back to the other state. It is also possible to arrange it so that repeated triggers at one point cause it to change state back and forth.
See also: Bistable, Monostable, Astable.
One way of changing the state is to have the flip flop's state invert when a "clock" signal changes state. Usually they change only when the clock moves in a particular direction, e.g. low (ground) to high (usually 5 Volts). This is called a "T", for "toggle" flip flop.
Another type of flip flop changes when a set or clear input is pulsed. This is called a Set/Reset flip flop.
A final type records an input's state when a clock is pulsed. This is called a "D" flip flop.
Use: The basic use is to implement finite state machines by using electronic logic. Basically, the flip flops remember the machine's previous state, and digital logic uses that state to calculate the next state.
The "T" flip flop is useful for counting. Repeated signals to the clock input will cause the flip flop to change state once per cycle of high to low - low to high transition on the clock input. The output from one flip flop can be fed to a second and so on. The arrangement will count, in binary, the number of cycles of the original clock input, up to a maximum count of 2n-1, where n is the number of flip flops used.
One of the problems with such a counter is that the output is briefly invalid as the changes ripple through the logic of the counter. To solve this problem, there are special counter circuits called "synchronous counters." These use more logic to assure that the outputs of the counter all change at the same, predictable time.
Frequency division: a chain of "T" flip flops as described above will also function to divide an input in frequency by 2n, where n is the number of flip flops used between the input and the output.
Registers to store numbers in computers. A "D" flip-flop can represent one digit of a binary number. The computer's control unit puts out the clock signal at the right time to capture the data.
flip flops are a kind of loose sandal which characteristically "flips" and "flops" as the wearer walks.