Creating a logic circuit from an expression

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Creating a logic circuit from an expression

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. To draw a circuit for X = (A AND B) OR C, which gate do you draw first?
A The AND gate, because it is in the brackets
B The OR gate, because it gives the final output X
2. How many gates are needed to draw X = (A AND B) OR C?
A 3 gates: one for each input A, B and C
B 2 gates: one AND and one OR
3. In X = (A AND B) OR C, where does input C connect?
A To the AND gate along with A and B
B Directly to the OR gate
4. For X = (A OR B) AND C, which gate produces the final output X?
A The AND gate
B The OR gate
5. How do you draw X = NOT A for a circuit?
A One NOT gate with A as its only input
B One NOT gate with A and a second input of 0

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1X = (A AND B) OR C AThe gates are swapped. The bracket contains AND, so A and B go into an AND gate first, and the OR gate comes last with C.
2X = NOT (A OR B) BDraw an AND gate for A and B first, then feed its output and C into a final OR gate that gives X
3Draw one gate for each operator, so an expression with two operators needs two gates joined by a wire CDraw an OR gate for A and B, then pass its output through a NOT gate to give X
4A NOT applied to a single input is drawn as a NOT gate on that input before it reaches the next gate DThe OR in the bracket was left out. Every operator needs its own gate, so A and B must go into an OR gate whose output feeds the AND gate with C.
5For X = (A AND B) OR C, drawing an OR gate for A and B, then an AND gate with C EX = (A OR B) AND C
6For X = (A OR B) AND C, drawing one AND gate with the inputs A, B and C and no OR gate FX = (NOT A) AND B

Definitions

X = (A AND B) OR C

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
X = (A AND B) OR C Gate 1 (bracket): ___ gate, inputs A and B Gate 2: OR gate, inputs Gate 1 and C
2.
X = (A OR B) AND C Gate 1: OR gate, inputs A and B Gate 2: ___ gate, inputs Gate 1 and C
3.
X = (NOT A) AND B Gate 1: ___ gate, input A Gate 2: AND gate, inputs Gate 1 and B
4.
X = (A AND B) OR (B AND C) One gate per operator, so gates needed: _
5.
X = (A OR B) AND C Gate 1 output and C feed the AND gate The AND gate output is labelled _

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A X = (A AND B) OR C
B Gate 1: OR, inputs A and B
C Gate 2: OR, inputs G1 and C
D Gate 2 output is X
Question 2
A X = (A OR B) AND C
B Gate 1: OR, inputs A and B
C Gate 2: AND, inputs G1 and C
D Gate 1 output is X
Question 3
A X = (A AND B) OR (NOT C)
B Gate 1: AND, inputs A and B
C Gate 2: NOT, input C
D Gate 3: OR, inputs A and G2
E Gate 3 output is X
Question 4
A X = NOT (A AND B)
B Gate 1: AND, inputs A and B
C Gate 2: NOT, input A
D Gate 2 output is X
Question 5
A X = A OR (B AND C)
B Gate 1: AND, inputs A and B
C Gate 2: OR, inputs A and G1
D Gate 2 output is X

Answer Key

Creating a logic circuit from an expression
Section A: Quick Questions
Q1
A — The AND gate, because it is in the brackets
Q2
B — 2 gates: one AND and one OR
Q3
B — Directly to the OR gate
Q4
A — The AND gate
Q5
A — One NOT gate with A as its only input
Section B: Match the Pairs
Q1
X = (A AND B) OR C → Draw an AND gate for A and B first, then feed its output and C into a final OR gate that gives X
Q2
X = NOT (A OR B) → Draw an OR gate for A and B, then pass its output through a NOT gate to give X
Q3
Draw one gate for each operator, so an expression with two operators needs two gates joined by a wire → X = (A OR B) AND C
Q4
A NOT applied to a single input is drawn as a NOT gate on that input before it reaches the next gate → X = (NOT A) AND B
Q5
For X = (A AND B) OR C, drawing an OR gate for A and B, then an AND gate with C → The gates are swapped. The bracket contains AND, so A and B go into an AND gate first, and the OR gate comes last with C.
Q6
For X = (A OR B) AND C, drawing one AND gate with the inputs A, B and C and no OR gate → The OR in the bracket was left out. Every operator needs its own gate, so A and B must go into an OR gate whose output feeds the AND gate with C.
Section C: Definitions
Q1
X = (A AND B) OR C — Draw one gate per operator: the bracket (A AND B) becomes an AND gate first, and its output feeds the final OR gate along with C to give X.
Section D: Fill in the Blanks
Q1
X = (A AND B) OR C Gate 1 (bracket): AND gate, inputs A and B Gate 2: OR gate, inputs Gate 1 and C
Q2
X = (A OR B) AND C Gate 1: OR gate, inputs A and B Gate 2: AND gate, inputs Gate 1 and C
Q3
X = (NOT A) AND B Gate 1: NOT gate, input A Gate 2: AND gate, inputs Gate 1 and B
Q4
X = (A AND B) OR (B AND C) One gate per operator, so gates needed: 3
Q5
X = (A OR B) AND C Gate 1 output and C feed the AND gate The AND gate output is labelled X
Section E: Spot the Error
Q1
B — The bracket (A AND B) must become an AND gate. Line 2 should read 'Gate 1: AND, inputs A and B'.
Q2
D — The final gate (the AND gate, Gate 2) produces X. Gate 1 only feeds into Gate 2. Line 4 should read 'Gate 2 output is X'.
Q3
D — The final OR gate must take the outputs of the two bracketed gates, G1 and G2, not the raw input A. Line 4 should read 'Gate 3: OR, inputs G1 and G2'.
Q4
C — NOT applies to the whole bracket, so the NOT gate takes the output of the AND gate (G1), not input A. Line 3 should read 'Gate 2: NOT, input G1'.
Q5
B — The bracket contains B and C, so the AND gate must take inputs B and C. Line 2 should read 'Gate 1: AND, inputs B and C'.