Ham radio, visually · Lesson 16
Logic and op-amps
Two families of chips run inside every modern radio. Digital logic treats voltages as just two values, 1 and 0, and computes with them: counting, dividing frequencies, controlling everything. The operational amplifier is the opposite: a near-perfect analog amplifier whose behavior you set with a couple of resistors. Both are worth a few questions on the Extra exam, and both are fun.
Logic gates
A gate looks at its inputs and produces an output by a fixed rule. With positive logic, a high voltage means 1 and a low voltage means 0. Click the inputs:
- AND: 1 only if all inputs are 1. OR: 1 if any input is 1.
- NAND and NOR are AND and OR followed by an inversion (the little circle on the symbol): a NAND outputs 0 only if all its inputs are 1.
- XOR (exclusive OR) is 1 when exactly one input is 1; an XNOR is the opposite, 0 when one and only one input is 1. NOT inverts.
- A list of every input combination and its output is a truth table.
Figure E6-3 (gate symbols on the exam)

2 is NAND, 4 is NOR, 5 is NOT (inversion).
Inside the chips
- CMOS logic uses the least power, and its input switching threshold is about half the supply voltage, giving it good immunity to noise. BiCMOS combines CMOS's high input impedance with bipolar transistors' low output impedance.
- Tri-state outputs have three states: 0, 1, and high impedance (disconnected), so several chips can share one wire.
- A pull-up or pull-down resistor, to the positive or negative supply, gives an input or output a defined level when nothing else drives it.
- An FPGA (field-programmable gate array) is a chip of configurable logic, designed in a hardware description language (HDL).
Flip-flops: memory, and dividing by two
Connect gates in a loop and they can remember: a flip-flop is bistable, staying in whichever of two states it was put. Wired to toggle at every clock pulse, each flip-flop flips at half the rate of its input, dividing the frequency by 2. Chain them:
- n flip-flops divide by 2ⁿ: 4 of them divide by 16. They're also an n-bit binary counter: a 3-bit counter has 8 states. A decade counter gives one output pulse for every 10 input pulses.
- A shift register is a clocked chain of flip-flops that passes data along one step per clock.
- Multivibrators: bistable (the flip-flop, two stable states), monostable (switches to its other state for a set time when triggered, then returns), and astable (keeps flipping between two states by itself, with no clock: an oscillator).
Comparators, and why hysteresis helps
A comparator turns an analog voltage into a digital one: its output changes state when the input crosses a threshold. A noisy input crossing slowly would make it chatter, flipping many times. Hysteresis uses two thresholds, a higher one to switch on and a lower one to switch off (like the squelch in course ch. 11):
The operational amplifier
An op-amp is a high-gain, direct-coupled differential amplifier: it amplifies the difference between its two inputs, enormously, with a very high input impedance and a very low output impedance. On its own its gain is far too high to use. With negative feedback (part of the output fed back to the inverting input), the gain is set purely by resistors. Figure E7-3 is the classic inverting amplifier:
- Gain = −RF ÷ R1 (the minus sign: the output is inverted). 10 Ω and 470 Ω: 47. 1000 Ω and 10 kΩ with 0.23 V in: −2.3 V out. 1800 Ω and 68 kΩ: about 38. 3300 Ω and 47 kΩ: about 14.
- Why it works: the op-amp drives its output until its two inputs are at the same voltage, so the inverting input sits at 0 V ("virtual ground"). The input current Vin/R1 must all flow through RF, so Vout = −Vin × RF/R1.
- A capacitor across RF lowers the feedback impedance at high frequencies, so gain falls as frequency rises: a low-pass filter. Op-amp active filters can ring and become unstable if gain and Q are too high: restrict both.
- An ideal op-amp's gain wouldn't vary with frequency; a real one's open-loop gain falls, and the frequency where it reaches 1 is its gain-bandwidth. Input offset voltage is the small differential input needed to bring the open-loop output to zero.
Figure E7-3

Exam questions, explained
E7A04: Flip-flops to divide by 16? 4.
Each divides by 2: 2 × 2 × 2 × 2 = 16.
E7A07: What does a NAND gate do? Outputs 0 only if all inputs are 1.
It's AND, inverted: check the truth table above.
E6C01: Why hysteresis in a comparator? To prevent input noise from causing unstable output.
Slide the hysteresis up and the chatter stops.
E7G09: R1 = 1 kΩ, RF = 10 kΩ, 0.23 V in? −2.3 V.
Gain −10, inverted.
Practice the real questions this lesson covers:
Extra E6C, E7A, E7G General G7B (gates, counters, amplifiers)
Last updated