The two-input disagreement detector

Measure all four states of a real XOR gate.

Difficulty: Breadboard. Estimated build time: about 25 minutes. 4-line bill of materials. Compare supplier offers when available. An XOR output is high when its two inputs disagree.

Prepare the bench

Use an isolated, regulated 5 V source with a 20 mA current limit and a digital voltmeter with approximately 10 MΩ input resistance. These are bench tools, not included in the shopping list. Disconnect power before changing connections. Confirm breadboard rail continuity and check for supply shorts before powering up.

Power and define every input

SN74HC86N PDIP-14, top view: pin 14 to +5 V and pin 7 to ground, 100 nF nearby between them. First gate inputs are pins 1 and 2; output is pin 3. Tie unused input pins 4, 5, 9, 10, 12 and 13 to ground. Leave outputs 6, 8 and 11 unconnected.

Set the four combinations

For each measurement, power off, connect each of inputs 1 and 2 directly to either ground (0) or +5 V (1), then power on. Never leave an input floating. Test 00, 01, 10 and 11. This power-off method avoids asking a noisy hand-operated contact to be a clean CMOS edge.

Read the disagreement rule

Measure pin 3 in DC volts relative to ground. Expected logical outputs are 0, 1, 1, 0, respectively; high and low are real voltages near the supply rails, not exact mathematical values. Do not connect the output to a rail or to another output.