HomeElectronics & CircuitsOperational Amplifier — The Op-Amp Building Block

📐 Operational Amplifier — The Op-Amp Building Block

An op-amp with negative feedback obeys two golden rules: no input current, and inputs held equal. From these, build inverting, non-inverting and summing amplifiers.

Electronics & Circuits3DModerate60 FPS
operational-amplifier ↗ Open standalone

About this simulation

This lab models an ideal operational amplifier (op-amp) wrapped in negative feedback, obeying two golden rules: no current flows into either input, and feedback forces the two inputs to the same voltage. In the inverting, summing and integrator layouts that pins the inverting input to 0 V — a virtual ground — even though it is not wired to ground. From there, closed-loop gain falls out of resistor ratios alone: −Rf/Rin for inverting, 1+Rf/Rin for non-inverting, or a time-integral when the feedback resistor is swapped for a 1 µF capacitor. A live circuit diagram and scrolling oscilloscope trace show the input and output waveforms updating every frame, including hard clipping once the output would exceed the supply rails.

🔬 What it shows

Four op-amp topologies — inverting, non-inverting, summing and integrator — computed frame by frame from the same two golden rules. The circuit diagram redraws its resistors, feedback element and virtual-ground node live, while a scope panel plots 240 samples of Vin and Vout so you can watch gain, phase inversion and clipping happen in real time.

🎮 How to use it

Pick a topology with the four config buttons, then drag the Rin, Rf and (for summing) R2 sliders to change resistor values in kilohms. Amplitude and Frequency shape the input signal, and Supply rails (±Vcc) set the clipping limit. Pause freezes the animation, Reset restores the defaults, and the "?" button opens a full equation reference.

💡 Did you know?

The op-amp's name dates back to 1940s analogue computers, where these circuits performed mathematical "operations" — summing, inverting and, as reproduced by the integrator mode here, time-integration — to solve differential equations mechanically, decades before digital computers took over the job.

Frequently asked questions

What are the two "golden rules" this simulation relies on?

Rule 1: no current ever flows into either op-amp input, because an ideal op-amp has infinite input impedance. Rule 2: negative feedback makes the op-amp drive its output until the two inputs sit at the same voltage (a "virtual short"). Every gain formula used in this simulator — inverting, non-inverting, summing and integrator — is derived from just these two rules applied to the resistor network you build with the sliders.

Why does the inverting input sit at 0 V even though it isn't grounded?

In the inverting, summing and integrator configurations the non-inverting input (V+) is tied to real ground. Rule 2 then forces the inverting input (V-) to match V+, so it also sits at 0 V — without a wire to ground. This is the virtual ground the simulation labels on the circuit diagram; it still carries current through Rin and the feedback element even while its voltage stays at zero.

How is the gain calculated for each configuration?

Inverting mode uses Av = -Rf/Rin; non-inverting uses Av = 1 + Rf/Rin; summing computes Vout = -Rf·(V1/R1 + V2/R2) so each input channel gets its own weight; and the integrator mode replaces Rf with a fixed 1 µF capacitor, so Vout = -(1/RC)·∫Vin dt. The readout panel shows the live equation and numeric gain for whichever mode is selected.

What does the integrator mode actually simulate?

With the feedback resistor replaced by a capacitor, the current through Rin charges the capacitor instead of flowing straight to the output, so the output becomes the running time-integral of the input, scaled by -1/RC. The simulation feeds the integrator a square wave and numerically accumulates -(1/RC)·Vin·dt every animation frame (with a small 0.05% per-frame leak to stop the value drifting away forever), which is why a square-wave input produces a triangle-wave output.

Why does the waveform flatten out at the top and bottom sometimes?

That is clipping (saturation). A real op-amp cannot output more voltage than its supply rails allow, so once amplitude × gain would exceed the ±Vcc you set with the Supply rails slider, the simulation clamps Vout to that limit and marks the readout "(CLIP)". Raising the rails or lowering the gain removes the flat-topping.

⚙ Under the hood

An op-amp with negative feedback obeys two golden rules: no input current, and inputs held equal. From these, build inverting, non-inverting and summing amplifiers.

op-ampfeedbackinvertingvirtual groundCanvas 2D

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)