CleverSphere

Logic gates and circuits

A logic circuit connects gates into a function. You evaluate it by working out the signals one after another.

Rules

  • NAND = negated AND, NOR = negated OR
  • XOR: 1 when the inputs differ
  • XNOR: 1 when the inputs are equal
  • Work out intermediate signals one by one
  • NAND alone can build any function

Your turn

Three problems on this topic. Any equivalent formula counts.

  1. 1 · Logic circuit
  2. 2
  3. 3

Find the output Z of the circuit for all inputs.

SignalGateInputs
XORC, A
YORX, B
ZXNORX, Y

Z for each input ABC

Tap a cell to switch between 0 and 1. The digits above are the values of the variables.

Worked example

Find the output Z of the circuit for all inputs.

SignalGateInputs
XNORC, B
YORX, A
ZNORX, Y

Worked solution

  1. 1000: X = 1, Y = 1, Z = 0
  2. 2001: X = 0, Y = 0, Z = 1
  3. 3010: X = 0, Y = 0, Z = 1
  4. 4011: X = 0, Y = 0, Z = 1
  5. 5100: X = 1, Y = 1, Z = 0
  6. 6101: X = 0, Y = 1, Z = 0
  7. 7110: X = 0, Y = 1, Z = 0
  8. 8111: X = 0, Y = 1, Z = 0

Typical mistake: NAND and NOR are the negated AND and OR; XNOR is 1 when both inputs are equal.

Common questions

Why is NAND universal?

NOT, AND and OR can all be built from NAND, and with them any Boolean function.

Related

More topics