# Flip flop circuit

When I search the circuit of a flip flop I often find:

But sometimes it's drawn like this:

I suppose there are several ways to create a flip flop ... but I am not clear on the difference between the two.

• Those are the same just collector resistors are changed to p-mos. Commented Aug 1 at 18:56

If I redraw the FET implementation, with the left-hand transistor gates facing inwards, it might become clearer. Notice how the left hand FET circuit begins to more closely resemble the BJT version:

simulate this circuit – Schematic created using CircuitLab

Note: In your own FET diagram, there is only one path labelled "feedback", but in fact there are two. The join between $$\V_{OUT1}\$$ and $$\V_{IN2}\$$ is also a feedback path, which is clear to see in my representation above left.

On the right I've replaced the upper transistors with resistors, and suddenly it's obvious that it's the same as the BJT version, but using FETs instead.

The only remaining difference is that the BJT implementation has base resistors $$\R_{B1}\$$ and $$\R_{B2}\$$. They are necessary to limit base current, but the FETs do not have this requirement.

In any case, each left-hand pair Q1+Q3, or Q1+R1 is a digital inverter, as is each right-hand pair. Using a resistor instead of a FET is less power efficient, but both versions invert a digital signal. These all do the same thing, $$\OUT = \overline{IN}\$$:

simulate this circuit

Every version of the flip-flop circuit, both of yours, and both of mine, are implementing the same system. Using "inverter" symbols instead of pairs of transistors/resistors, they all look like one of these:

simulate this circuit

If you look carefully they're all exactly the same circuit. The trick is to spot this, in spite of differences in layout.

• thank you for your answer. But in practice, if I am designing an integrated circuit, I guess it is preferable to use the CMOS configuration as it avoids resistors (passive components). Is this the advantage? If yes, I guess the configuration with resistors is 'obsolete'? I would like to understand the advantages/disadvantages of both Commented Aug 2 at 9:40
• @toby514 Most modern implementations on an integrated circuit would employ CMOS (push-pull FET pairs), for power efficiency and ease of manufacture, but there are still reasons for using BJTs in an IC. 74LS logic ICs (TTL, using BJTs, diodes and resistors) are often faster than their 74HC (CMOS) cousins, and I believe 74F (TTL) is often faster than 74AC (CMOS), so BJTs/resistors still have their place. Commented Aug 2 at 10:35

For a latch to function positive feedback from an output to an input is required. Because the most simple logic structure is a single-transistor inverter, two of these in a circle is the most efficient circuit. From any point in the loop, traveling all the way around the loop means going through two devices. In fact, they both could be non-inverting buffers, but this takes as least twice the number of components. The complete logic path must be non-inverting, either with buffers or with an even number of inverters.

There often are large differences between how a circuit is built using discrete components, and how it is built inside an integrated circuit. In your case, the blue and red structures are the internal schematic of a CMOS logic inverter, and Q1 and Q2 are acting as saturated switch inverters.

MOSFETs do not need current limiting resistors the way bipolar transistors do, so that eliminates RB1 and RB2. RC1 and RC2 are replaced by the active pull-up transistors in the CMOS circuit.

• "... they both could be non-inverting buffers"... Why then should there be two? Commented Aug 1 at 20:32
• You're right. Many flipflops have two inputs (Set and Reset) that affect the outputs in opposite ways. That means two inverting devices, and I carried that over to the much less common, non-inverting case. Commented Aug 1 at 20:38
• I thought a lot about this at the time when I wanted to explain it to my students so that they would understand the meaning of connecting two inverters in a loop. I remember that I had come to the conclusion that if they were only non-inverting they, could not be returned to their previous state. Commented Aug 1 at 20:48
• @AnalogKid thank you for your answer. But in practice, if I am designing an integrated circuit, I guess it is preferable to use the CMOS configuration as it avoids resistors (passive components). Is this the advantage? If yes, I guess the configuration with resistors is 'obsolete'? I would like to understand the advantages/disadvantages of both Commented Aug 2 at 8:45

Those two circuit are generally considered latches (with no inputs shown to change their state).

Flip-flops are usually considered to be clock-triggered latches.