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

  1. Identify the operations in the expression, working from innermost to outermost (follow bracket order).
  2. Draw inner gates first. Any operation inside brackets, or any NOT applied to a single variable, is drawn closest to the inputs (leftmost).
  3. Connect outputs to inputs. The output wire of each gate feeds into the input of the next gate to its right.
  4. Add the final gate last and label its output Q.
Gate symbol reminder: NOT = triangle with output circle  |  AND = D-shape  |  OR = curved body  |  XOR = OR with extra input arc

Worked Examples

Expression 1: A · B

Steps:

  1. The overbar on A means A passes through a NOT gate. Draw NOT with A as input.
  2. The · means an AND gate. Its upper input is the NOT output (A); its lower input is B directly.
  3. The AND output is Q.
A B Q

Q = 1 only when A = 0 (so NOT A = 1) AND B = 1.

Expression 2: A · B + C

Steps:

  1. Precedence: AND (·) before OR (+). Draw the AND gate first with inputs A and B.
  2. The overbar on C means C passes through a NOT gate. Draw NOT with C as input.
  3. The + means an OR gate. Its upper input is the AND output (A · B); its lower input is the NOT output (C).
  4. OR output is Q.
A B C 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.

  1. A passes through a NOT gate first (overbar on A).
  2. The OR gate (inside brackets) takes NOT output and B. Draw OR second.
  3. The AND gate (outermost) takes OR output and C. Draw AND last (rightmost).
  4. AND output is Q.
A B C 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.