Op-Amp Simulator: Inverting, Non-Inverting & Differential

simulator intermediate ~10 min
Loading simulation...
Av = -10 — 100 mV in → 1.0 V out (inverted)

Inverting configuration with Rf=100kΩ and Rin=10kΩ gives a gain of -10. A 100mV input produces a 1.0V inverted output, well within the ±12V saturation limits.

Formula

Av_inverting = -Rf / Rin
Av_non-inverting = 1 + Rf / Rin
Av_differential = Rf / Rin × (V+ - V-)
GBW = Gain × Bandwidth = constant

The Most Versatile Analog IC

The operational amplifier is arguably the most important building block in analog electronics. Invented in the 1940s for analog computers and miniaturized into an integrated circuit by Bob Widlar in 1963 (the μA702), the op-amp can be configured to amplify, filter, compare, integrate, differentiate, and perform arithmetic on analog signals — all by choosing the right external resistor network. The classic 741 op-amp alone has sold billions of units.

The Virtual Short: Key to Understanding

The golden rule of op-amp analysis: with negative feedback, the op-amp adjusts its output to make the voltage difference between its two inputs essentially zero. This "virtual short" principle, combined with the assumption that no current flows into the inputs (infinite input impedance), lets you derive the gain formula for any configuration using simple algebra. This simulator computes the gain from your resistor values and draws the resulting waveform.

Three Essential Configurations

The inverting amplifier (gain = -Rf/Rin) is the workhorse configuration — easy to cascade and ideal for summing circuits. The non-inverting amplifier (gain = 1 + Rf/Rin) provides high input impedance, critical for buffering sensor signals. The differential amplifier (gain = Rf/Rin applied to V+ - V-) rejects common-mode noise, making it essential for instrumentation. This simulator lets you switch between all three and immediately see how the output changes.

Saturation and Real-World Limits

Ideal op-amp theory assumes infinite gain, infinite bandwidth, and infinite input impedance. Real op-amps have none of these. The most visible limitation is output saturation: the output cannot exceed the supply voltage (minus a dropout of about 1-2V for standard op-amps). When the calculated output exceeds Vsat, the waveform clips — the flat tops visible in this simulator's output. Rail-to-rail op-amps reduce but don't eliminate this limitation.

FAQ

What is an operational amplifier?

An operational amplifier (op-amp) is a high-gain differential amplifier with two inputs (inverting and non-inverting) and one output. With external feedback resistors, it can be configured to perform precise mathematical operations: amplification, addition, subtraction, integration, and differentiation. The name 'operational' comes from its original use in analog computers to perform mathematical operations.

What is the difference between inverting and non-inverting configurations?

In the inverting configuration, the signal enters the inverting (-) input through Rin, and the gain is -Rf/Rin (output is phase-inverted). In the non-inverting configuration, the signal enters the non-inverting (+) input, and the gain is 1 + Rf/Rin (output is in phase). The non-inverting config has very high input impedance; the inverting config has input impedance equal to Rin.

What is the gain-bandwidth product?

The gain-bandwidth product (GBW) is a constant for any given op-amp: Gain × Bandwidth = GBW. A typical op-amp with GBW = 1 MHz can provide a gain of 10 up to 100 kHz, or a gain of 100 up to 10 kHz. Higher gain means lower bandwidth. This is a fundamental trade-off in amplifier design.

Why do op-amps use negative feedback?

Without feedback, an op-amp has extremely high open-loop gain (100,000+), making it impractical as a linear amplifier — any tiny input would saturate the output. Negative feedback (connecting the output back to the inverting input through Rf) trades gain for stability, precision, and bandwidth. The closed-loop gain depends only on the external resistor ratio, not on the op-amp's variable open-loop gain.

Sources

Embed

<iframe src="https://homo-deus.com/lab/electrical-engineering/op-amp/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub