Theory — Logic Gates and ICs

Back to Electronics hub Glossary

Logic gates and truth tables, the control circuits you must be able to describe (op-amp comparator and the 555), and the IC pin-outs on the data sheet.

Concept 1

Logic gates & truth tables

Key words

Logic gate
a part that gives a 1 or 0 output from 1/0 inputs.
Truth table
a table of every input and the output it gives.
Combinational
gates joined so one gate's output feeds the next.

A logic gate takes digital inputs (1/0) and gives a digital output set by its truth table. You must identify a gate from its symbol or truth table and complete a truth table. The symbols below are the distinctive shapes (the IEC operator is in brackets).

AND gate
AND (&)
output 1 only when all inputs are 1
OR gate
OR (≥1)
output 1 when any input is 1
NOT gate
NOT (1)
inverts: 0→1, 1→0
NAND gate
NAND (&)
AND then inverted
NOR gate
NOR (≥1)
OR then inverted
XOR gate
XOR (=1)
output 1 when inputs differ

Gate explorer

Choose a gate and toggle inputs A and B. The output and the highlighted truth-table row update live.

Combinational logic — work out the intermediate level first. Gates can be chained (up to 4 inputs, 2 outputs). Here an AND gate gives the intermediate signal G = A AND B, then an OR gate gives the output F = G OR C. Fill the G column before the output — exactly what the exam's "complete the truth table" question expects.

F = (A AND B) OR C
ABCG = A·BF = G + C
00000
00101
01000
01101
10000
10101
11011
11111

An AND gate gives an output of 1 only when inputs are 1. An OR gate gives 1 when input is 1. A NOT gate its input.

Practice 1 — complete the truth table

A system has two outputs from inputs A and B: X = A AND B and Y = A NOR B. Complete both output columns for all four input rows.

Answer
A B → X (AND), Y (NOR) 0 0 → X = 0, Y = 1 0 1 → X = 0, Y = 0 1 0 → X = 0, Y = 0 1 1 → X = 1, Y = 0

You can now…

  • identify a gate from its symbol or truth table.
  • complete a truth table, working out any in-between level first.
Concept 2

Control circuits you must describe

Key words

Comparator
an op-amp that compares a signal with a set reference voltage.
Astable
a circuit that switches by itself — a continuous square wave.
Monostable
one trigger gives one output pulse of a fixed length.

You should be able to give a short "how it works" description for each of these circuits — and recognise the circuit diagram. All resistors are drawn the UK (BS) way, as a rectangle. The transistor switch is the fourth circuit you must describe.

Op-amp comparator. The op-amp compares two voltages: a sensor divider on one input and a set reference level on the other. When the sensor voltage rises above the reference, the output swings high (LED on); below it, the output is low. This switches an output at a chosen light or temperature level.

Op-amp comparator: a reference voltage divider and a thermistor sensor divider feed a 741 op-amp that switches an LED
The op-amp compares the sensor voltage with the reference and switches the LED.
7411offset (n/c)2− in ← reference3+ in ← LDR4V− → 0V8n/c7V+ → +V6output → LED5offset (n/c)
What connects to each 741 pin in this comparator.

555 astable. With no trigger needed, the 555 runs continuously: C charges through R1 + R2 and discharges through R2, so pin 3 gives a steady square wave that switches between high and low. Bigger R or C values make it slower (lower frequency) — a flashing-LED or tone circuit.

555 astable circuit: resistors and a capacitor set the timing, giving a continuous square wave on pin 3 that flashes two LEDs
R1, R2 and C set the on/off times; pin 3 gives a continuous square wave.
5551GND → 0V2trigger (→6)3output → LED4reset → +V8V+ → +V7discharge → R1/R26threshold (→2, R2/C)5control (0.01µF)
What connects to each 555 pin in this astable.

555 monostable. It has one stable state. A short trigger pulse on pin 2 makes pin 3 go high for one fixed time set by R and C (a longer time for bigger R or C), then it returns low on its own — a one-shot timer (e.g. a timed light).

555 monostable circuit: a trigger button makes pin 3 go high for one fixed time set by R and C, lighting a lamp
A trigger makes pin 3 go high for one fixed time set by R and C, then it returns low.
5551GND → 0V2trigger ← button3output → LED4reset → +V8V+ → +V7discharge (→6, R)6threshold (→7, C)5control (0.01µF)
What connects to each 555 pin in this monostable.
Practice 2

A 555 is wired so that one push of a button makes an LED stay on for exactly 5 seconds, then it goes off on its own. Is this an astable or a monostable, and what two components set the 5-second time?

Answer
It is a monostable (one trigger → one fixed pulse). The time is set by the resistor (R) and capacitor (C) — a bigger R or C gives a longer time.

You can now…

  • describe an op-amp comparator.
  • describe a 555 astable and a 555 monostable, and say what sets their timing.
Concept 3

IC pin-out reference

Key words

IC
an integrated circuit — a "chip".
Pin-out
which job each pin (leg) of the chip does.
Notch
the mark that shows the pin 1 end of the chip.

These are the pin-outs given on the SQA data sheet, so you can recognise them in the exam and complete IC pin-out diagrams. The notch (or dot) marks the pin 1 end.

741 op-amp (8-pin)

741 op-amp DIP pin-out 12 34 87 65 Offset null Inverting − Non-inv + V− NCV+ OutputOffset null

555 timer (8-pin)

555 timer DIP pin-out 12 34 87 65 Ground Trigger Output Reset V+ (Vcc)Discharge ThresholdControl V

7408 — Quad 2-input AND

7408 14-pin DIP pin-out11A21B31Y42A52B62Y7Gnd14Vcc134B124A114Y103B93A83Y

7432 — Quad 2-input OR

7432 14-pin DIP pin-out11A21B31Y42A52B62Y7Gnd14Vcc134B124A114Y103B93A83Y

7400 — Quad 2-input NAND

7400 14-pin DIP pin-out11A21B31Y42A52B62Y7Gnd14Vcc134B124A114Y103B93A83Y

7402 — Quad 2-input NOR

7402 14-pin DIP pin-out11Y21A31B42Y52A62B7Gnd14Vcc134Y124B114A103Y93B83A

7486 — Quad 2-input XOR

7486 14-pin DIP pin-out11A21B31Y42A52B62Y7Gnd14Vcc134B124A114Y103B93A83Y

7404 — Hex NOT (inverters)

7404 14-pin DIP pin-out11A21Y32A42Y53A63Y7Gnd14Vcc136A126Y115A105Y94A84Y
On every 7400-series chip pin 14 = Vcc (power) and pin 7 = Gnd (0 V); the gates' input and output pins depend on the chip type above.
Practice 3

On a 555 timer, which pin is the output, and on a 7408 AND-gate chip which pins are the power supply (Vcc) and ground (0 V)?

Answer
The 555 output is pin 3. On the 7408 (and every 7400-series chip), Vcc is pin 14 and ground is pin 7.

You can now…

  • read the 741, 555 and 7400-series pin-outs.
  • find the power (Vcc) and ground (0 V) pins on a chip.
Interactive

Logic Lord — build the truth tables

Fill in the output (Q) column for every gate. Tap a cell to cycle it through 0 and 1. Get every cell right to earn the Logic Lord badge — completing the six Theory badges also unlocks Theory Triumph.

Set every output scored

Tap each Q cell to set it. Check your tables to mark them — fix any reds and check again.

View my progress

Check

Check your understanding

Pick an answer to see feedback on it. You can then try the others. Your score counts first tries only.

RAG self-check

Tap Red / Amber / Green for how confident you feel.