Writing a logic expression from a logic circuit: one gate

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

Writing a logic expression from a logic circuit: one gate

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. An AND gate has inputs A and B and output X. Which expression is correct?
A A AND B = X AND
B X = A AND B
2. A NOT gate has one input A and output X. Which expression is correct?
A X = NOT A
B X = A NOT B
3. An OR gate has inputs A and B. Which expression describes it?
A X = A OR B
B X = A AND B
4. A circuit has one gate with the symbol of a NOR gate, inputs A and B, output X. Which expression is correct?
A X = A NAND B
B X = A NOR B
5. Which statement about writing an expression for a single gate is true?
A Name the gate, then write X = with the input letters and the gate name
B Write only the input letters and leave out the gate name

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 AThe output is missing: the expression must start with X = to show what the gate outputs.
2X = NOT A BX = A OR B
3A circuit has one OR gate with inputs A and B and output X. Write its expression. CThe expression for a circuit with one NOT gate that has a single input A and output X
4A circuit has one NOR gate with inputs A and B and output X. Write its expression. DX = A NOR B
5X = A NOT EThe expression for a circuit with one AND gate whose inputs are A and B and whose output is X
6A AND B FNOT has one input and the gate name goes before the letter, so this is written the wrong way round.

Definitions

X = A AND B

Fill in the Blanks

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

1.
Circuit: OR gate, inputs A and B X = A __ B
2.
Circuit: NOT gate, input A X = ___ A
3.
Circuit: NOR gate, inputs A and B X = A ___ B
4.
Circuit: XOR gate, inputs A and B _ = A XOR B
5.
Circuit: NAND gate, inputs B and C X = B NAND _

Spot the Error

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

Question 1
A Circuit: one AND gate
B Inputs: A only
C Output: X
D X = A AND B
Question 2
A Symbol: flat back, no bubble
B Gate: OR
C Inputs: A and B
D X = A AND B
Question 3
A Circuit: one NOT gate
B Input: A
C Output: X
D X = A NOT
Question 4
A Circuit: one NOT gate
B Inputs: A and B
C Output: X
D X = A OR B
Question 5
A Symbol: triangle and bubble
B Gate: NOT
C Inputs: A and B
D X = NOT A

Answer Key

Writing a logic expression from a logic circuit: one gate
Section A: Quick Questions
Q1
B — X = A AND B
Q2
A — X = NOT A
Q3
A — X = A OR B
Q4
B — X = A NOR B
Q5
A — Name the gate, then write X = with the input letters and the gate name
Section B: Match the Pairs
Q1
X = A AND B → The expression for a circuit with one AND gate whose inputs are A and B and whose output is X
Q2
X = NOT A → The expression for a circuit with one NOT gate that has a single input A and output X
Q3
A circuit has one OR gate with inputs A and B and output X. Write its expression. → X = A OR B
Q4
A circuit has one NOR gate with inputs A and B and output X. Write its expression. → X = A NOR B
Q5
X = A NOT → NOT has one input and the gate name goes before the letter, so this is written the wrong way round.
Q6
A AND B → The output is missing: the expression must start with X = to show what the gate outputs.
Section C: Definitions
Q1
X = A AND B — Name the gate, then write X = with the input letters and the gate name, e.g. an AND gate with inputs A and B is X = A AND B. NOT has one input: X = NOT A.
Section D: Fill in the Blanks
Q1
Circuit: OR gate, inputs A and B X = A OR B
Q2
Circuit: NOT gate, input A X = NOT A
Q3
Circuit: NOR gate, inputs A and B X = A NOR B
Q4
Circuit: XOR gate, inputs A and B X = A XOR B
Q5
Circuit: NAND gate, inputs B and C X = B NAND C
Section E: Spot the Error
Q1
B — An AND gate has two inputs, so the line should read 'Inputs: A and B'. The expression X = A AND B uses both letters.
Q2
B — A flat-backed, D-shaped symbol with no bubble is an AND gate, not an OR gate. The line should be 'Gate: AND'.
Q3
D — The gate name goes before the input letter. NOT has one input, so the expression is X = NOT A.
Q4
A — The circuit has two inputs, A and B, and the expression uses OR, so it is an OR gate. A NOT gate has only one input. The line should be 'Circuit: one OR gate'.
Q5
C — A NOT gate has only one input. The line should be 'Input: A', matching X = NOT A.