lcamtuf’s thing • 3877 implied HN points • 22 Dec 25
- An op-amp simply amplifies the voltage difference between its inputs by a huge factor, and with feedback you force its inputs to be nearly equal so passive parts (resistors, diodes, caps) can be arranged to perform math instead of just gain.
- Addition and subtraction are straightforward: resistor networks can average or sum signals and a non‑inverting amplifier scales them to produce a true sum, while difference amplifiers give Vout ≈ VA − VB and can be biased to work on a single supply.
- Harder operations are possible too: multiplication/division can be done with log/antilog converters that use the diode’s exponential V–I curve plus a summing stage, and integration is implemented by charging a capacitor with a controlled current to produce precise ramps, though these analog tricks need careful biasing and have practical limits (rails, linearity, noise).