Logic circuit from expression
Drawing a Logic Circuit from a Boolean Expression
A Boolean expression written in AQA notation can be converted directly into a logic circuit diagram. The process is the reverse of reading a circuit: you identify each operation in the expression, draw the corresponding gate, and connect the outputs of earlier gates to the inputs of later ones. The result is a complete circuit that implements exactly what the expression describes.
The Four-Step Method
- Identify the operations in the expression, working from innermost to outermost (follow bracket order).
- Draw inner gates first. Any operation inside brackets, or any NOT applied to a single variable, is drawn closest to the inputs (leftmost).
- Connect outputs to inputs. The output wire of each gate feeds into the input of the next gate to its right.
- Add the final gate last and label its output Q.
Worked Examples
Expression 1: A · B
Steps:
- The overbar on A means A passes through a NOT gate. Draw NOT with A as input.
- The · means an AND gate. Its upper input is the NOT output (A); its lower input is B directly.
- The AND output is Q.
Q = 1 only when A = 0 (so NOT A = 1) AND B = 1.
Expression 2: A · B + C
Steps:
- Precedence: AND (·) before OR (+). Draw the AND gate first with inputs A and B.
- The overbar on C means C passes through a NOT gate. Draw NOT with C as input.
- The + means an OR gate. Its upper input is the AND output (A · B); its lower input is the NOT output (C).
- OR output is Q.
AND and NOT gates are drawn at the same level (both feed the OR gate). Neither feeds the other.
Expression 3: (A + B) · C
The brackets force OR to be evaluated before AND - the opposite of default precedence. This determines the drawing order.
- A passes through a NOT gate first (overbar on A).
- The OR gate (inside brackets) takes NOT output and B. Draw OR second.
- The AND gate (outermost) takes OR output and C. Draw AND last (rightmost).
- AND output is Q.
Brackets in the expression directly control which gate is drawn first. OR (inside brackets) is drawn before AND (outermost).
Key Takeaways
- Draw gates from inputs to output: inner operations (brackets, NOT) are drawn first, closest to the inputs. The final operation is drawn last, furthest right.
- Any variable with an overbar must pass through a NOT gate before reaching the next gate.
- Brackets override default precedence and directly determine which gate is drawn before another - the bracketed operation is always drawn first.
- Without brackets, AND (·) is drawn before OR (+). With brackets around OR, OR is drawn first even though it has lower precedence.