3.2.2 From Problem Statements to Logic Circuits
A worded rule describes conditions and an outcome. To implement that rule as digital hardware, the conditions must first become Boolean inputs, then a logic expression, and finally a connected arrangement of gates.
This lesson develops one reliable route: problem statement → labelled propositions → logic expression → logic circuit. The reverse translations are covered in the next section.
By the end of this section, you should be able to:
- Separate Boolean conditions from the outcome in a problem statement.
- Assign clear input symbols and define the output.
- Select AND, OR, NOT, NAND, NOR or XOR from the meaning of the rule.
- Use brackets to preserve the intended grouping of conditions.
- Translate a logic expression into a left-to-right gate circuit.
- Build multi-stage circuits using gates with no more than two inputs.
- Check a circuit using carefully chosen test cases.
The anatomy of a logic problem
A useful problem statement contains two different kinds of information:
| Part | Meaning | Example |
|---|---|---|
| Conditions | Statements that can each be represented as 0 or 1. | A staff badge is valid. Lockdown is active. Supervisor override is enabled. |
| Outcome | The result produced when the required combination of conditions is met. | Unlock the equipment cabinet. |
Common mistake
Do not assign a symbol to an action such as “scan the card”. Assign symbols to conditions that have a stable Boolean meaning, such as “the scanned card is valid”.
A four-stage construction method
- Extract: identify every condition that can be true or false and separate these conditions from the outcome.
- Label: assign one symbol to each condition and another symbol, often X, to the output.
- Group: choose the Boolean operators and write an expression with brackets that preserve the intended meaning.
- Build: draw one gate for each operation and connect intermediate outputs towards the final output.
Exam tip
Do not jump directly from the paragraph to a circuit. A written expression gives you a plan and makes omitted NOT gates or incorrect groupings easier to detect.
Reading the wording carefully
Everyday language does not always name the operator directly. The following phrases often suggest a particular Boolean relationship.
| Wording | Likely operation | Interpretation |
|---|---|---|
| both, together, only when each condition is met | AND | Every listed condition must be 1. |
| either condition is sufficient, at least one | OR | One or both conditions may be 1. |
| not, inactive, unavailable, outside the limit | NOT | The stated condition is inverted. |
| one of the two, but not both | XOR | The two inputs must be different. |
| not both | NAND | The output is 0 only for input pair 11. |
| neither condition | NOR | The output is 1 only for input pair 00. |
Language warning
The word or is normally inclusive in Boolean logic. Use XOR only when the wording clearly excludes the case where both conditions are true.
Worked example: equipment cabinet access
Step 1: Identify the conditions and outcome
| Symbol | Meaning when the value is 1 |
|---|---|
| A | The staff badge is valid. |
| B | Maintenance lockdown is active. |
| C | Supervisor override is enabled. |
| X | The equipment cabinet unlocks. |
Step 2: Translate each part
| Worded part | Boolean form |
|---|---|
| A valid badge and lockdown is not active | A AND NOT B |
| That route, or supervisor override | (A AND NOT B) OR C |
Step 3: Write the complete expression
X = (A AND NOT B) OR C
The brackets show that A must first be combined with the inverted B input. The result of that stage is then combined with C.
From the expression to the circuit
Read the expression from the innermost operation towards the final output:
- Pass B through a NOT gate.
- Feed A and NOT B into an AND gate.
- Feed the AND output and C into an OR gate.
- Label the OR output X.
Exam tip
Draw inputs on the left and the final output on the right. Keep wires separate, label every external input, and place inversion before the gate that needs the complemented value.
Why grouping and brackets matter
The same letters and operators can describe different systems when they are grouped differently.
| Expression | First operation | Meaning |
|---|---|---|
| X = (A AND B) OR C | Combine A and B with AND. | C can make X = 1 by itself. |
| X = A AND (B OR C) | Combine B and C with OR. | A must be 1 in every case where X = 1. |
| X = NOT (A OR B) | Combine A and B with OR, then invert. | This is a NOR relationship. |
| X = (NOT A) OR B | Invert only A. | B is not affected by the NOT operation. |
Common mistake
NOT (A OR B) is not the same as (NOT A) OR B. A NOT gate affects only the signal or grouped result connected to it.
Building with two-input gates
In this course, gates other than NOT are treated as two-input gates. If three or more conditions use the same operator, combine them in stages.
Example: X = A OR B OR C
- Create an OR gate for A and B.
- Connect that intermediate result to one input of a second OR gate.
- Connect C to the other input.
- The second OR gate produces X.
| Expression part | Intermediate signal |
|---|---|
| A OR B | P = A OR B |
| P OR C | X = P OR C |
Exam tip
You do not need to label every intermediate wire unless it helps clarity, but each Boolean operation in the expression must be represented by a gate or an equivalent gate.
Interactive prerequisite: Boolean Operator Lab
Use this retained widget to check how one operator responds before using it inside a larger expression.
Interactive: Problem Statement to Circuit Plan
The original widget structure has been retained, but its scenarios and logic have been independently rebuilt. Select a situation to inspect the conditions, symbols, expression, and gate-building sequence.
Checking a circuit with selected cases
A few carefully chosen inputs can expose common construction errors before a full truth table is produced.
| A | B | C | Expected X | Reason |
|---|---|---|---|---|
| 1 | 0 | 0 | 1 | The valid badge route succeeds because lockdown is not active. |
| 1 | 1 | 0 | 0 | Lockdown blocks the badge route. |
| 0 | 1 | 1 | 1 | Supervisor override succeeds independently. |
| 0 | 0 | 0 | 0 | No unlocking route is active. |
These cases do not replace the full truth-table method taught in 3.2.3, but they are useful design checks.
Exam support
Write definitions before drawing
State what each input means when its value is 1. This prevents accidental inversion of a condition such as door locked versus door unlocked.
Follow the expression structure
Start with bracketed or NOT operations, create intermediate results, and work towards the final output.
Do not simplify unless asked
When given a specific expression, construct that expression faithfully. Equivalent simplification is a separate skill and may obscure the required working.
Common mistakes and misconceptions
- Using the outcome as an input proposition.
- Assigning symbols before deciding exactly what a value of 1 means.
- Using OR when every condition is required.
- Forgetting a NOT gate for wording such as “not active”.
- Ignoring brackets and connecting gates in the wrong grouping.
- Drawing a three-input gate when the course expects two-input gates.
- Leaving input or output wires unlabelled.
Practice
Build expressions first
- A ventilation fan starts if the room is occupied and the carbon-dioxide level is high.
- A warning light activates if the access panel is open or the battery is low.
- A test signal is accepted if exactly one of two sensors is active.
- A pump starts if the tank is not empty and irrigation is requested.
For each statement, define the inputs and output, then write a logic expression.
Original circuit-construction task
A drone may take off if GPS lock is available and the battery is ready. Test mode can also authorise take-off.
- Identify the three propositions.
- Assign A, B, and C.
- Write an expression for output X.
- Describe the gate sequence.
- Draw the circuit using two-input gates.
Find the interpretation error
Rule: “Sound the alarm when neither the front sensor nor the rear sensor is active.”
A student writes X = A OR B. Explain the error and provide a correct expression.
Grouping challenge
Explain how the circuits for (A AND B) OR C and A AND (B OR C) must differ.
Review
| Stage | Question to ask |
|---|---|
| Extract | Which statements can each be 0 or 1, and what is the required output? |
| Label | What does a value of 1 mean for A, B, C and X? |
| Group | Which operators match the wording, and where are brackets needed? |
| Build | Which gate represents each operation, and in what order are the results combined? |
| Check | Do selected input cases produce outcomes that match the original rule? |