Mystery Circuit

The circuit shown on the left is called a NAND gate. It is a digital circuit, meaning that its inputs and outputs take value 0 and 1. The behaviour of the NAND gate is displayed on the right in the form of a truth table. We see that it outputs zero if and only if both inputs are one.

v w Z
0 0 1
0 1 1
1 0 1
1 1 0

Truth table

NAND gate

Although extremely simple in itself, circuits of NAND gates can accomplish extremely complex tasks. For example, the central part of a computer, called the processor or CPU, is built from NAND gates. Here we investigate what happens when we connect just two NAND gates together in the way displayed below.

Can you tell what this circuit does?

Mystery circuit

Advanced stuff

Check your conjectures by loading the mystery component in the simulator.

Want more? Look at a computer processor in action.