Logic expression for a single gate

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

Logic expression for a single gate

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which is the correct logic expression for an AND gate with inputs A and B?
A X = A AND B
B X = A and B
2. Which is the correct logic expression for a NOT gate with input A?
A X = A NOT
B X = NOT A
3. Which expression shows an XOR gate with inputs A and B?
A X = A OR B
B X = A XOR B
4. Which expression describes a NAND gate with inputs A and B?
A X = A NAND B
B X = NAND A B
5. What does a logic expression start with?
A The output: X =
B The inputs: A B =

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 gate name is written in lower case. Gate names must be in capitals, so it should be X = A AND B.
2X = NOT A BThe output X is the opposite of input A: 1 becomes 0 and 0 becomes 1.
3A NAND gate with inputs A and B is written with the output X, an equals sign and the gate name in capitals between the inputs. CNOT is placed after the input letter. NOT goes before the input it applies to, so it should be X = NOT A.
4An XOR gate with inputs A and B is written with the gate name XOR in capitals between the input letters. DThe output X is 1 only when both input A and input B are 1.
5X = A and B EX = A NAND B
6X = A NOT FX = A XOR B

Definitions

X = A AND B

Fill in the Blanks

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

1.
X = ___ A
2.
X = A ___ B
3.
X = A ____ B
4.
X = A ___ B
5.
_ = A NAND B

Spot the Error

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

Question 1
A X = A and B
B X = A NAND B
C X = A XOR B
D X = NOT A
Question 2
A X = NOT A
B X = A NOR B
C A XOR B = X
Question 3
A X = A AND B
B X = A OR B
C X = A NAND B
D X = A NOT
Question 4
A X = NOT A
B X A NAND B
C X = A XOR B
Question 5
A Inputs A, B and output X
B X = A XOR C
C X = NOT A

Answer Key

Logic expression for a single gate
Section A: Quick Questions
Q1
A — X = A AND B
Q2
B — X = NOT A
Q3
B — X = A XOR B
Q4
A — X = A NAND B
Q5
A — The output: X =
Section B: Match the Pairs
Q1
X = A AND B → The output X is 1 only when both input A and input B are 1.
Q2
X = NOT A → The output X is the opposite of input A: 1 becomes 0 and 0 becomes 1.
Q3
A NAND gate with inputs A and B is written with the output X, an equals sign and the gate name in capitals between the inputs. → X = A NAND B
Q4
An XOR gate with inputs A and B is written with the gate name XOR in capitals between the input letters. → X = A XOR B
Q5
X = A and B → The gate name is written in lower case. Gate names must be in capitals, so it should be X = A AND B.
Q6
X = A NOT → NOT is placed after the input letter. NOT goes before the input it applies to, so it should be X = NOT A.
Section C: Definitions
Q1
X = A AND B — A logic expression for one gate: write the output X, an equals sign, then the input letters joined by the gate name in capitals, such as X = NOT A or X = A XOR B.
Section D: Fill in the Blanks
Q1
X = NOT A
Q2
X = A AND B
Q3
X = A NAND B
Q4
X = A XOR B
Q5
X = A NAND B
Section E: Spot the Error
Q1
A — Gate names must be written in capitals. The line should be X = A AND B.
Q2
C — A logic expression starts with the output, X, then an equals sign, then the inputs and gate. It should be X = A XOR B.
Q3
D — NOT has only one input, and the gate name goes before it. It should be X = NOT A.
Q4
B — The equals sign is missing after X. The expression should be X = A NAND B.
Q5
B — This circuit only has inputs A and B, so C should not appear. The line should be X = A XOR B.