Learn
A1.2.5 | CONSTRUCT LOGIC DIAGRAMS
01 | TURN A RULE INTO A CIRCUIT
A room lamp should turn on when the room is dark or a person requests it manually. However, a disable switch must prevent the lamp coming on. How could you show that rule using logic gates?
A logic diagram represents a Boolean function using gate symbols and connecting signal lines. Each gate applies its own rule. The connections show how results move between gates to produce the final output.
You have already used expressions and truth tables. A diagram gives a third view of the same behaviour: an expression describes the operations, a diagram shows their connections, and a truth table checks every input combination.
This lesson builds diagrams from simple expressions first, then combines gates into larger circuits. We use one-input NOT and two-input versions of the other gates.
02 | DEFINE THE SIGNALS BEFORE DRAWING
Use A = “room is dark”, B = “manual request” and C = “lamp disabled”. Define output X = “lamp on command”. For each signal, 1 means the statement is true and 0 means it is false.
The requirement becomes X = (A OR B) AND (NOT C). The bracketed OR provides the request. NOT C is true when the lamp is not disabled. The final AND allows a request through only when the disable condition is false.
Do not label C as “enabled” and still invert it. That would change the rule. Write the definitions beside your drawing so another person can interpret the diagram without guessing.
| Signal | Meaning of 1 | Meaning of 0 |
|---|---|---|
| A | Room is dark | Room is not dark |
| B | Manual request active | No manual request |
| C | Lamp disabled | Lamp not disabled |
| X | Lamp on command | Lamp off command |
03 | RECOGNISE INPUTS, OUTPUTS AND GATE SYMBOLS
Signals in our diagrams enter from the left and outputs leave on the right. A line carries one logical value at a time; it does not represent a number that must be added to the other lines.
A D-shaped body represents AND. OR has a curved input side. XOR adds another curved line before the OR shape. NOT is a triangle with a small output circle. The small circle is an inversion bubble, meaning the result is complemented.
NAND, NOR and XNOR add an output bubble to AND, OR and XOR respectively. The bubble changes the Boolean function, so it must be clear. Other symbol conventions exist; this lesson consistently uses these distinctive shapes.
04 | START WITH THE OUTERMOST OPERATION
For a longer expression, ask: which operation produces the final output? In X = (A OR B) AND (NOT C), the final operation is AND. Draw that gate near the right and label its output X.
Its two inputs are not directly A and B. They are the results of the two grouped expressions. Call them P = A OR B and Q = NOT C. Connect P and Q to the final AND.
Then build the smaller expressions to the left. This approach works backwards from the output while the finished signals flow forwards from inputs to output. It prevents you drawing gates in the order that their names happen to appear on the page.
| Sub-expression | Gate needed | Output label |
|---|---|---|
| A OR B | OR with inputs A and B | P |
| NOT C | NOT with input C | Q |
| P AND Q | AND with inputs P and Q | X |
05 | BUILD AND CONNECT THE THREE GATES
Draw OR on the upper left and connect A and B to its inputs. Its output is P. Draw NOT below it and connect C to its single input. Its output is Q.
Draw the final AND to the right. Connect the OR output P to one AND input and NOT output Q to the other. Label the final output X. There are three independent inputs and three gates. P and Q are internal signals, not additional independent inputs.
The wire from P bends down to the upper input of AND. The wire from Q bends up to its lower input. The two routes are separate; they must not be joined together. Draw with space around labels so a reader can follow each connection.
06 | REVEAL THE CONSTRUCTION ONE STAGE AT A TIME
Start with the three input lines, then add the gates in stages. At each stage, say what the new output means before revealing the next connection.
07 | CHECK A DIAGRAM BY TRACING ITS SIGNALS
Construction is not finished until you check the connections. Use A = 0, B = 1 and C = 0. OR produces P = 1; NOT produces Q = 1; AND produces X = 1. This matches a manual request while the lamp is not disabled.
Now change C to 1. Q becomes 0 and the final AND must output 0. If your diagram still turns the lamp on, inspect the NOT gate or the final connection.
One successful example does not prove the diagram works for every input. A complete three-input truth table tests all eight combinations. The activity below displays intermediate outputs as well as the final result.
| A | B | C | P | Q | X |
|---|
08 | WHERE NOT GOES CHANGES THE MEANING
X = NOT (A OR B) means calculate OR first and invert its output. Draw OR, then NOT. A single NOR gate gives the same Boolean function.
By contrast, Y = (NOT A) OR B inverts only A before the OR. That requires a NOT on A’s route, not on the final output. These expressions are not interchangeable.
With A = 0 and B = 1, NOT (A OR B) gives 0, but (NOT A) OR B gives 1. This counterexample is enough to show the circuits differ.
| A | B | NOT (A OR B) | (NOT A) OR B |
|---|---|---|---|
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 |
09 | BRANCHING A SIGNAL IS NOT COMBINING OUTPUTS
Sometimes the same input is needed in more than one part of a circuit. For X = (A AND B) OR (A AND C), A must reach both AND gates. A signal can branch so that the same value is supplied to several inputs. This is often called fan-out.
Mark an intended junction clearly with a filled dot. In this lesson, two crossing lines without a dot are not connected. Avoid unnecessary crossings, and use the convention required by your course or diagram tool consistently.
A branch copies access to one signal; it is not a gate and does not calculate AND or OR. Do not join the outputs of separate gates to pretend you have combined their values. Use an appropriate gate to perform that operation.
In a real circuit, electrical loading limits how many inputs an output can drive. Here we are constructing the logical model rather than choosing physical components.
10 | READ A DIAGRAM BACK INTO AN EXPRESSION
To check your own drawing, reverse the process. Start at the left, label each gate output with its expression and substitute those expressions into later gates.
For our lamp, the upper gate gives P = A OR B. The lower gate gives Q = NOT C. The last gate gives X = P AND Q. Substitution gives X = (A OR B) AND (NOT C), exactly the intended rule.
If your drawing reads back as X = A OR (B AND NOT C), you have changed the grouping. In that circuit, A = 1 makes X = 1 even if C = 1. The final OR allows A to bypass the disable condition.
Reading back is useful because a drawing can look tidy yet still connect the wrong signals. Check the structure, then use a full truth table to check the behaviour.
11 | CHOOSE THE GATES AND TEST YOUR DESIGN
The layout below has fixed connections: A and B enter gate P, C passes through the lower route Q, then P and Q enter the final gate. Choose each function to implement X = (A OR B) AND (NOT C).
The lower “wire” option passes C through unchanged; it is included to help you see the effect of omitting NOT. The checker compares your design with the required output for every input combination. If it fails, it gives one counterexample.
12 | CONSTRUCT FROM A REAL REQUIREMENT
An equipment locker should release if a valid card is present or a staff override is active, but only while the safety lock is inactive. Define V = valid card, S = staff override, L = safety lock active and R = release.
Translate the request as V OR S, the permission as NOT L, and combine them with AND: R = (V OR S) AND (NOT L). The diagram has the same structure as the lamp example, with different signal labels.
A common error is R = V OR (S AND NOT L). That allows a valid card to bypass the safety lock. The required phrase “but only while…” applies to the whole release request, so the final gate must enforce the permission on both possible requests.
Construct the correct diagram in your book and check V = 1, S = 0, L = 1. The correct output is 0. Then construct its complete truth table. This is a simplified Boolean requirement, not a complete physical safety or security design.
13 | WORKING FROM A TRUTH TABLE
If you are given a truth table rather than an expression, one constructive method is to identify every row where the output is 1. Make an AND term that recognises each such row, then OR those terms together. This gives a working diagram, though not necessarily the simplest one.
For two inputs, suppose X = 1 for 01 and 10 only. The 01 row is recognised by (NOT A) AND B. The 10 row is recognised by A AND (NOT B). OR the two results: X = ((NOT A) AND B) OR (A AND (NOT B)).
Draw two NOT gates to supply the complemented inputs, two AND gates to detect the rows, and one OR gate for the final output. You may branch A and B where they are needed on more than one route.
The table is also the two-input XOR function, so one XOR gate is an equivalent implementation. A longer correct diagram can implement the same function as a shorter one. Follow any stated restrictions on the gate types you may use.
| A | B | (NOT A) AND B | A AND (NOT B) | X |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 |
14 | A CONSTRUCTION CHECKLIST THAT EXPLAINS YOUR THINKING
Begin by defining the inputs and output. Translate the rule into an expression with clear grouping. Identify the final operation, draw its gate, then construct the sub-expressions that feed it. Label intermediate signals where that makes the connections easier to explain.
Use recognisable symbols, clear input and output labels, and a separate line to each intended gate input. Show junctions explicitly. Leave space around wires and bubbles, and avoid ambiguous crossings.
Finally, read your drawing back into an expression and check every input combination. A diagram is correct because its connections produce the required behaviour, not because it resembles a sample’s position or colour.
For a construct question, provide the actual completed diagram. Describing “use an OR and an AND” without showing their inputs and connections leaves the solution incomplete.