DoRevision

Logic Gatekeeper

Four gates, and one of them is different in more than one sense. Why XOR earns its place, how to build it from the other three, and how to fill a three-gate truth table without losing your way.

⏱️ 24 min 🎯 14 activities
Best used for
Intervention Mock preparation Cover lesson

Get the method right under pressure

Free interactive practice on the steps that lose marks under exam pressure.

Start revising free

What you'll cover

The gate that means different

Your specification examines four logic gates, and three of them are straightforward once you have met them. AND wants both. OR wants at least one. NOT reverses whatever it is given. The fourth is the interesting one, and it is worth understanding rather than memorising. XOR outputs 1 when its two inputs are different from each other, and 0 when they are the same. Now notice what that is. AND and OR answer questions about how many inputs are on. XOR answers a question about whether they match, which is a different kind of question altogether, and one that comes up constantly once you start looking: has this changed, do these two disagree, is exactly one of these true. You can express that using only AND, OR and NOT, and later in this module you will. But it takes a longer expression, which is precisely why the gate exists and has its own symbol. That is also, honestly, why some exam boards leave XOR out and yours does not: it is a convenience rather than a necessity. Yours expects it, so it is worth having properly.

Words for the four gates

Four gates and two terms for the machinery around them. Notice that only one of the four is about a relationship between the inputs rather than a count of them.

Match each gate to its rule

  • Outputs 1 only when both inputs are 1
  • Outputs 1 when at least one input is 1
  • Outputs 1 when the two inputs are different from each other
  • Takes a single input and reverses it
  • AND
  • OR
  • XOR
  • NOT

When are the inputs different

For Q = A XOR B, which rows of the truth table give an output of 1?

  • Only the two rows where A and B differ: A=0 with B=1, and A=1 with B=0
  • Any row where at least one input is 1, so three rows
  • Only the row where both inputs are 1
  • The two rows where A and B are the same

XOR against the other three

Put the four gates side by side and one of them is doing something structurally different. That is worth seeing, because it is why XOR is useful.

Which two describe XOR

Select the TWO statements that are true of an XOR gate.

  • It outputs 0 when both of its inputs are 1
  • It outputs 1 for exactly two of the four rows of its truth table
  • It outputs 1 whenever at least one input is 1
  • It has only one input, like NOT

Built from the others

Here is the claim from the first step, made good, and it is worth working through because it shows what a Boolean expression actually is. XOR outputs 1 when the inputs differ. Say that using only the gates you already had. The inputs differ when at least one of them is on, and it is not the case that both of them are on. Read that sentence again and notice it is already an expression: at least one is on is A OR B, and not both are on is NOT (A AND B). Join them with AND, because both conditions must hold, and you have Q = (A OR B) AND NOT (A AND B). Build the truth table for that and it gives 0, 1, 1, 0 down the four rows, which is exactly XOR. So XOR adds no power to the system; it adds convenience, because one gate and one symbol replace three gates and a bracket. That is genuinely why some specifications examine it and others do not, and if you have seen a friend on another board told to skip XOR, this is the reason. It is also a useful check on yourself: if you can rebuild XOR from AND, OR and NOT, you understand all four rather than having memorised a fourth table.

Fill the three-gate table

Complete the truth table for Q = (A AND B) XOR (NOT C). Fill the two middle columns first, then the output. All eight input combinations are listed for you.

Name what each column holds

To build a truth table for a circuit with more than one gate, count the inputs first: three inputs need _____ rows. List the combinations by counting up in _____. Then add one _____ column for each bracket in the expression, and complete those before the output. Filling the table _____ rather than across means each pass involves only one gate. And check the arithmetic of the gate itself: for XOR, a row where both inputs are the same gives an output of _____.

eight binary intermediate downwards 0 six denary output across 1

The expression that is not XOR

Four statements about building XOR from other gates. Select the ONE that is incorrect.

  • Q = (A OR B) AND NOT (A AND B) gives the same outputs as A XOR B.
  • XOR outputs 1 when the inputs differ, so two of its four rows give 1.
  • Q = (A AND B) OR NOT (A OR B) gives the same outputs as A XOR B.
  • XOR adds convenience rather than power, since it can be built from AND, OR and NOT.

Drawing what the words describe

Your specification asks you to draw circuits as well as read them. Put these steps into the order you would follow to draw a circuit from a description.

  • Identify the inputs and label them on the left
  • Find the operation that happens first, usually inside a bracket
  • Draw that gate and feed the correct inputs into it
  • Take its output as an input to the next gate along
  • Continue until every part of the expression is drawn
  • Label the final gate’s output Q on the right

Say what the circuit outputs

A circuit takes three inputs. A and B meet at an AND gate. C passes through a NOT gate. Those two results meet at an XOR gate to give Q. Assemble the expression.

Building a circuit from a description

A question describes a circuit in words and asks you to draw it and complete its truth table. Take the decisions in order.

  • The description says the output is 1 when exactly one of two switches is on. Which gate is that?
  • The circuit has three inputs in total. How many rows will the truth table need?
  • The expression has two brackets. What should the table contain?
  • You are drawing the diagram. Which gate goes on the right?

Explain all four gates

A friend on your course can use AND, OR and NOT but freezes whenever XOR appears. Explain all four gates and how to handle a circuit built from several of them.

  • State what each of the four gates outputs, and say which has only one input
  • Explain what makes XOR different in kind from AND and OR
  • Give the one row where XOR and OR disagree, and say what each outputs there
  • Show how XOR can be built from AND, OR and NOT, and say what that tells you about it
  • Explain how many rows a truth table needs for two inputs and for three, and why
  • Describe the column-by-column method for a multi-gate circuit
  • Explain how to draw a circuit from a Boolean expression, working from the brackets outwards
  • Finish with the check you would run on a completed table before moving on