How do digital logic gates make decisions from high and low inputs?
Digital logic gates (AND, OR, NOT) and their truth tables, including recognising gate symbols and completing a truth table for a single gate.
An SQA National 5 Engineering Science answer on digital logic gates, covering the AND, OR and NOT gates, their symbols and truth tables, the meaning of logic 1 and logic 0, and how to complete a truth table for a single gate.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this key area is asking
The SQA wants you to recognise the AND, OR and NOT logic gates, know their symbols and rules, and complete a truth table for a gate using logic 1 (high) and logic 0 (low).
Digital signals and logic levels
The three basic gates
Each gate has a standard symbol that you should recognise: the AND gate is a flat-backed D shape, the OR gate is a curved-back shield shape, and the NOT gate is a triangle with a small circle (the inverting "bubble") on its output. The bubble always means "invert", so wherever you see a small circle on a gate's output you know that gate's normal output has been flipped.
Gates can have more than two inputs. A three-input AND gate still outputs 1 only when all three inputs are 1; a three-input OR gate outputs 1 if any of the three is 1. The rule never changes - "all" for AND and "any" for OR - only the number of inputs you have to check.
Truth tables
A truth table lists the output for every possible combination of inputs. The number of rows is set by the number of inputs: one input gives 2 rows, two inputs give 4 rows, three inputs give 8 rows.
For a two-input AND gate:
| A | B | Output (A AND B) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
For a two-input OR gate the output is 1 in every row except the first (0, 0). For a NOT gate: input 0 gives output 1, and input 1 gives output 0.
Reading the gate from words
Exam questions often describe a requirement in words and ask which gate it needs. The trick is to spot the linking word. "Both ... and ..." or "all of these" points to an AND gate, because every condition must be met. "Either ... or ..." or "any of these" points to an OR gate, because one condition is enough. "Not", "the opposite of", or "unless" points to a NOT gate (an inverter). Translating the everyday wording into the matching gate is a quick, reliable source of marks.
Why logic gates matter
Logic gates are the process stage of digital control systems. Combining them lets a circuit make decisions such as "switch on only when it is dark AND someone is present", which is exactly the kind of automatic behaviour Engineering Science is about. They are reliable because a digital signal is either clearly high or clearly low, with no in-between, so small electrical noise does not change the result. Mastering the single gates is the step before combining them into the more complex logic of the next key area.
Try this
Q1. State the output of a NOT gate when its input is logic 0. [1 mark]
- Cue. Logic 1 (the NOT gate inverts its input).
Q2. For a two-input AND gate, in how many of the four rows is the output 1? [1 mark]
- Cue. One row only - when both inputs are 1.
Q3. An OR gate has inputs A = 1 and B = 0. State the output. [1 mark]
- Cue. Output 1, because at least one input is high.
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 style2 marksComplete the truth table for a two-input AND gate, listing the output for each of the four input combinations of A and B.Show worked answer →
An AND gate outputs 1 only when every input is 1.
A = 0, B = 0 gives output 0.
A = 0, B = 1 gives output 0.
A = 1, B = 0 gives output 0.
A = 1, B = 1 gives output 1.
Markers reward all four rows correct, with the single 1 appearing only when both inputs are 1. A common slip is to fill it in like an OR gate.
SQA N5 style2 marksState the difference between the output rule of an OR gate and an AND gate.Show worked answer →
Compare the two rules clearly.
An OR gate outputs 1 when at least one input is 1 (any input high gives a high output).
An AND gate outputs 1 only when all of its inputs are 1 (every input must be high).
Markers reward the "any input" rule for OR and the "all inputs" rule for AND. Stating only one gate does not earn the comparison.
Related dot points
- Combinational logic: combining gates to meet a control requirement, completing the truth table of a combined circuit, NAND and NOR gates, and reading a Boolean expression.
An SQA National 5 Engineering Science answer on combinational logic, covering how gates are combined to control an output, completing the truth table of a combined circuit, the NAND and NOR gates as inverted AND and OR, and writing a Boolean expression for a logic system.
- Programmable control: the microcontroller as a programmable process sub-system and the use of flowcharts with inputs, decisions, outputs and loops to control a system.
An SQA National 5 Engineering Science answer on programmable control, covering the microcontroller as a programmable process sub-system, why programmable control is flexible, and how a flowchart uses inputs, decisions, outputs, delays and loops to control a system automatically.
- Universal systems diagrams: representing an electronic or control system as input, process and output sub-systems using block diagrams.
An SQA National 5 Engineering Science answer on the universal systems approach, covering input, process and output sub-systems, drawing and interpreting block diagrams, the meaning of feedback, and identifying real components within each block.
- 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.