Tricky Circuit

The gate that notices disagreement

Spot the difference with XOR

XOR means Exclusive OR: an exclusive-OR gate gives 1 when its two inputs differ. A bit is a binary digit, 0 or 1, representing a low or high logic state.

Open interactive experiment

EXPERIMENT BENCH

Change the circuit settings, predict the readings, then check a challenge. These are learning models, with the assumptions explained in each lesson.

Sign in to save progress. Guest progress stays on this device.

Open laboratory in a full window

Why it works

Ideal binary logic: 0 means low and 1 means high, not a measured voltage. Supply behavior, current, output loading and response delay are omitted; diagrams show functions, not chip pinouts.

A and B are input bits; Y is output. The symbol ⊕ means XOR. Different inputs give Y = 1; equal inputs give Y = 0. A truth table lists the output for every input combination.

Difficulty
  1. Build · Build it

    Power on with A = 1 and B = 0. Make output Y = 1.

    Need a hint?

    A = 1; B = 0 → Y = 1

  2. Explore · Change the inputs

    Set A = 1 and B = 1. Make output Y = 0 despite both inputs being high.

    Need a hint?

    A = 1; B = 1 → Y = 0

  3. Solve it · Solve the challenge

    Set A = 0 and B = 0. Confirm output Y = 0.

    Need a hint?

    A = 0; B = 0 → Y = 0

Extra reading and circuit recipes

Spot the difference with XOR

Imagine checking whether two switches agree. XOR highlights the mismatch, turning two independent states into one useful answer.

Y = A ⊕ B

There are only four input combinations. Testing all four is stronger evidence than trying one bright output: it reveals the complete rule.

A useful pattern

Changing either single input reverses the output. Changing both inputs together keeps the same output.

Beyond the model

XOR can form the sum bit of a binary adder and combine bits for a parity check. The same simple rule supports arithmetic and error detection.

A useful trap to avoid

XOR is not ordinary OR: when both inputs are 1, XOR gives 0. It does not remember which input changed first.

Only A flips; B stays fixed. Output Y…

  1. always flips
  2. always stays unchanged
  3. must become 1
Read more

Changing one input changes equal inputs into different inputs, or different inputs into equal inputs.

Build it

Choose A = 1 and B = 0; power on. Different states give Y = 1.

Y = 1

Change the inputs

Choose A = 1 and B = 1; power on. Equal high states give Y = 0.

Y = 0

Try another path

Keep B fixed and flip A twice. The output returns to where it started. Then flip both inputs once and compare.

ti.com