Skip to main content

McCulloch-Pitts network, AND, XOR

Short answer

The McCulloch-Pitts neuron has binary inputs, fixed weights, and a threshold; it fires if net sum >= θ. For AND, use w1=w2=1, θ=2. XOR is not linearly separable, so a single M-P neuron cannot implement it; a multilayer network is needed.

What is a McCulloch/Pitts neural network? Explain it with reference to AND gate. Justify that it cannot be applied to Exclusive OR gate.

The McCulloch-Pitts (M-P) neuron (1943) is the first mathematical neuron model. Inputs and output are binary (0/1). Each input has a fixed weight (excitatory +, inhibitory −). The neuron fires (y = 1) if the net input Σ wᵢxᵢ is at least the threshold θ, otherwise y = 0. Weights and threshold are set by design, not learned.

 x1 --(w1)-->\
              ( net ≥ θ ? )--> y
 x2 --(w2)-->/

AND gate with M-P neuron

Take w1 = w2 = 1 and θ = 2.

x1x2net = x1 + x2y (net ≥ 2)
0000
0110
1010
1121

This matches the AND truth table.

Why XOR cannot be done by a single M-P neuron

XOR must give: (0,0)→0, (0,1)→1, (1,0)→1, (1,1)→0. This needs

  1. 0 < θ
  2. w2 ≥ θ
  3. w1 ≥ θ
  4. w1 + w2 < θ

From (2) and (3) with θ > 0: w1 + w2 ≥ 2θ > θ, which contradicts (4). So no choice of weights and threshold works.

Geometrically, a single neuron separates the plane by one straight line; the XOR points (0,0),(1,1) and (0,1),(1,0) lie on opposite diagonals and no single line separates them (not linearly separable).

Solution

XOR can be built with two layers: XOR = (x1 AND NOT x2) OR (NOT x1 AND x2), i.e. M-P neurons for the hidden terms (weights +1, −1, θ = 1) combined with an OR neuron. So XOR needs a multilayer network.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Artificial Intelligence chapter 6 questions →