What's inside an op-amp?
The internals of operational amplifiers are typically not explained well. Real talk about the differential pair.
In an earlier article on signal amplification, I discussed a couple of basic transistor amplifier circuits and then introduced op-amps as a better-behaved version of the same. This left one question unanswered: what’s inside an op-amp, anyway?
It’s easy to give a superficial answer. A typical operational amplifier has three main parts: a differential input stage, a voltage amplifier, and a push-pull output circuit. We covered the latter two in the previous article, and it’s tempting to wave away the first bit too.
Yet, the differential stage is a pretty interesting animal. At its heart lies an arrangement of transistors known as the differential pair (or “long-tailed pair”), and an accurate explanation of its mechanics is hard to come by. I’ll try to address this below — but let’s start with a brief detour.
The Vgs-Id curve of a field effect transistor
Let’s consider a typical n-channel MOSFET. We know that it’s a voltage-controlled device: that is, a voltage signal applied to the gate terminal (Vgs) modulates the flow of current through the main channel between the drain and the source. We denote this current as Id.
From this description, one could assume that FET is just an adjustable resistor: a device where the gate voltage dials in a specific drain-source resistance, and where that resistance stays roughly the same no matter what. If that model is true, then for some chosen Vgs, the current flowing through the main channel should have a linear relationship with the applied channel voltage (Vds). For an actual resistor, we obtain the following voltage-to-current plot:
The diagram, captured for a 10 kΩ resistor, makes perfect sense: from Ohm’s law, I = V/R; if R is dialed in to a fixed value, then the current through a resistive load should track the voltage in a straight line.
But that’s not at all what happens with a FET! Don’t take my word for it. I recorded the following curve for a common BS170 transistor at a fixed gate voltage Vgs = 2.25 V. I selected this voltage empirically just to maintain the same scale for both plots:
As it turns out, the transistor doesn’t behave like a Vgs-controlled resistance at all. Instead, Vgs appears to dial in a current limit. The limit shows some sensitivity to the driving voltage, but not a whole lot. In the plot, the current sits at 800 µA +/- circa 8% for Vds all the way from 0.5 to 9 V.
The long-tailed pair
Keeping this detail in mind, let’s get back to op-amps. As mentioned earlier, the essential building block of most differential amplifiers is the long-tailed pair; its simplest variant, drawn with n-channel MOSFETs for consistency with the earlier article, looks the following way:
The circuit consists of a pair of voltage followers sharing a common resistor on their low side. Each transistor will conduct only if the voltage on its gate terminal is sufficiently higher than the voltage on the source terminal connected to R2; we can write the conduction criteria as Vgs > Vth. Because the flow of current through the transistor (and thus the resistor) causes a voltage to appear across R2, the transistor will admit only as much current as needed for the resistor voltage to reach Vin - Vth.
Let’s make a couple of assumptions about component values and voltages and look at what happens if A > B for Vth = 2 V:
In this scenario, the equilibrium state is a 200 µA current is flowing entirely through the left branch of the circuit; the transistor on the right is not conducting because its source terminal is sitting at 2 V and the gate is only 1 V higher than that (i.e., Vgs < Vth). And because this transistor is off, the voltage at the output node is equal to Vdd.
In the inverse situation (A < B), the branch on the right ends up doing all the work:
Because there is 200 µA flowing through the upper resistor, there is a V = IR = 2 V drop at the output pin; in other words, Vout = 15 V - 2 V = 13 V.
Finally, if A and B are both at 4 V, both branches are handling 50% of the current, so the voltage drop across the upper resistor is halved, putting Vout at 14 V.
At first glance, this might sound like the behavior of an op-amp: we have three distinct output voltages for A < B, A = B, and A > B. Indeed, many online sources try to pass it off as a differential amplifier. That said, the circuit has a fatal flaw: its output voltage doesn’t depend only on the difference between A and B. To illustrate, let’s consider a scenario where A = B, but their common voltage is a bit higher — say, 6 V:
In this scenario, a drop of 4 V needs to develop across the bottom resistor before the transistors reach their cut-off points. This results in a combined current of 400 µA divided equally across both branches. In the right branch, the 50% current (200 µA) causes a 2 V drop across the output resistor, putting Vout at 13 V. That’s to say, the A = B scenario for 6 V inputs produces the same Vout as what we’ve seen in earlier A < B case analyzed for lower input voltages.
In other words, the differential amplifier is a dud. It is sensitive to common-mode inputs, making it impossible to reliably distinguish between differential voltages.
A workaround is hinted at by the name of the circuit: it’s called a “long tail” because in order for the amplifier to behave correctly, you need to maintain ample distance between the permissible input voltages and the bottom supply rail. For example, in a 15 V circuit, we could constrain the inputs to a range between 14 and 15 V. This way, a significant voltage drop would always be present across the “tail” resistor, and the overall current would vary only a tiny bit — making it easy to distinguish between 0%, 50%, and 100% of R2 current being sourced through the right-hand branch.
Toward a shorter-tailed pair
Of course, this input constraint is rather severe, especially in the age of single-supply electronics that commonly run off as little as 3.3 volts.
To improve this circuit without sacrificing its input range, it would be necessary to replace R2 with a device that can recreate a wide range of voltage drops while requiring only fairly modest current swings. This would make the current flowing R1 fairly insensitive to any common-mode artifacts.
Well — that’s our cue to wheel out the previously-discussed FET Vds-Id curve:
We have previously talked about what happened to current flowing between the drain and source terminals in response to the applied Vds voltage (it didn’t change much). But we can also turn the plot sideways and make another observation: varying the current by just +/- 8% is enough to produce a wide range of terminal voltages, from 0.5 V all the way to 9 V.
A single FET with a trimmed gate voltage could be used as a drop-in replacement for the bottom resistor (R2) in the differential amplifier. The problem with a single transistor is that its characteristics will drift in response to factors such as ambient temperature, so it’s best to add some sort of a feedback loop. One such circuit — known as the current mirror — is shown below:
For a moment, let’s focus only on the part on the left. At first, there’s no current flowing through the transistor, so the drain terminal quickly shoots toward Vdd; so does the gate terminal, prompting the transistor to start conducting. This, in turn, creates a voltage drop across R, eventually lowering the gate voltage toward the cut-off region. This is a negative feedback loop; an equilibrium is reached when the transistor is admitting current equal to I = (Vdd - Vth) / R.
On its own, this is worthless, but there is a carefully matched transistor on the right. It has no feedback mechanism, but is supplied with the same gate voltage — and therefore, should admit the same current through the connected load, with relatively little dependence on what the load is.
This particular current mirror is controlled by a fixed reference — R — so it becomes what’s known as a “current source”. This term is somewhat sketchy because the device does not move any electrons on its own, not in the sense that a battery does; rather, it’s just a current-limiting contraption. But I digress.
Current sources have their own (uncommon) circuit symbol, so a revised version of the not-so-long-tailed pair might look this way:
And that, in a nutshell, is a very basic but reasonably well-behaved differential stage.
Because the Vgs < Vth dead zone near 0 V is typically undesirable, the circuit is often constructed as an upside-down version with p-channel MOSFETs. It’s also possible to employ JFET transistors to get rid of the threshold altogether. In all cases, the operating principle is the same.
👉 To review the entire series of articles on analog and digital electronics, check out this page.
I write well-researched, original articles about geek culture, electronic circuit design, algorithms, and more. This day and age, it’s increasingly difficult to reach willing readers via social media and search. If you like the content, please subscribe!









Minor nitpick: The arrow in the current source symbol represents the direction of current flow. The second long-tailed pair diagram has it the wrong way around.