Skip to main content
ScotlandEngineering ScienceSyllabus dot point

How does an operational amplifier compare two voltages or boost a small signal?

The operational amplifier as a comparator and as an inverting amplifier, including calculating the voltage gain and output voltage of an inverting amplifier.

An SQA National 5 Engineering Science answer on the operational amplifier, covering its use as a comparator that switches when two input voltages cross, the inverting amplifier configuration, and calculating the voltage gain and output voltage from the feedback and input resistors.

Generated by Claude Opus 4.810 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this key area is asking
  2. The op-amp as a comparator
  3. The op-amp as an inverting amplifier
  4. Why the op-amp matters
  5. Try this

What this key area is asking

The SQA wants you to know the operational amplifier (op-amp) in two roles: as a comparator that decides which of two voltages is larger, and as an inverting amplifier whose voltage gain is set by two resistors.

The op-amp as a comparator

This is extremely useful in control. Feed a sensing voltage (from an LDR or thermistor divider) to one input and a fixed reference voltage to the other, and the comparator output switches the moment the sensed voltage crosses the reference. That output can then drive a transistor and an output device.

The reference voltage is usually set with a second voltage divider, often one with a variable resistor so the switching point can be adjusted. This is exactly how a frost alarm or a thermostat chooses the temperature at which it acts: turning the variable resistor moves the reference voltage, which moves the threshold at which the comparator flips. Because the output snaps cleanly between high and low rather than changing gradually, the comparator gives a sharp, reliable switch from a smoothly varying sensor signal.

The op-amp as an inverting amplifier

A small signal (for example, from a microphone or sensor) is often too small to be useful and must be amplified. The inverting amplifier uses one input resistor R1R_1 and one feedback resistor RfR_f to set a precise gain.

So the output voltage is Vout=RfR1×VinV_{out} = -\dfrac{R_f}{R_1}\times V_{in}. A larger RfR_f or smaller R1R_1 gives a larger gain.

Why the op-amp matters

The op-amp gives you two of the most useful processing blocks in the course: a precise comparator for threshold switching, and an amplifier for boosting weak signals. Both turn up in control circuits and both lead naturally into a transistor output stage.

Try this

Q1. State what a comparator does. [1 mark]

  • Cue. It compares two input voltages and switches its output high or low depending on which input is higher.

Q2. An inverting amplifier has Rf=80 kΩR_f = 80 \text{ k}\Omega and R1=10 kΩR_1 = 10 \text{ k}\Omega. Calculate the gain. [2 marks]

  • Cue. gain=Rf/R1=80/10=8\text{gain} = -R_f/R_1 = -80/10 = -8.

Q3. An inverting amplifier of gain 4-4 has an input of +0.50 V+0.50 \text{ V}. Find the output. [2 marks]

  • Cue. Vout=4×0.50=2.0 VV_{out} = -4 \times 0.50 = -2.0 \text{ V}.

Exam-style practice questions

Practice questions written in the style of SQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

SQA N5 style3 marksAn inverting amplifier has a feedback resistor of 100 kohm and an input resistor of 20 kohm. Calculate its voltage gain.
Show worked answer →

Use the inverting amplifier gain relationship.

Relationship: gain=RfR1\text{gain} = -\dfrac{R_f}{R_1}, where RfR_f is the feedback resistor and R1R_1 the input resistor.

Substitution: gain=10020=5\text{gain} = -\dfrac{100}{20} = -5.

The gain is 5-5: the output is 5 times the input and inverted (opposite sign). Markers reward selecting the relationship, substituting (the kilo-ohms cancel), and stating the gain, including the minus sign or noting the inversion.

SQA N5 style3 marksAn inverting amplifier has a gain of -8. An input voltage of +0.30 V is applied. Calculate the output voltage.
Show worked answer →

Use the definition of gain to find the output.

Relationship: gain=VoutVin\text{gain} = \dfrac{V_{out}}{V_{in}}, so Vout=gain×VinV_{out} = \text{gain} \times V_{in}.

Substitution: Vout=8×0.30=2.4 VV_{out} = -8 \times 0.30 = -2.4 \text{ V}.

The output is 2.4 V-2.4 \text{ V}: 8 times larger and opposite in sign to the input. Markers reward selecting the relationship, substituting and giving the output in volts with the correct (negative) sign.

Related dot points

Sources & how we know this