A controlled inverter is a single XOR gate with one input used as a control line M:
- M = 0: Y = = B. The data passes straight through.
- M = 1: Y = = . The data is inverted.
So XOR means "invert, if told to". The truth table shows it: the rows with M = 0 copy B, and the rows with M = 1 flip it.
It's the key part of an adder subtractor. Subtraction needs A + + 1, so each B bit passes through a controlled inverter before reaching its full adder. One control line drives every XOR at once, and the same line also sets the carry-in C0 for the +1. In an ALU, that line is the SUB signal decoded from the opcode.
The controlled inverter alone only produces the ones complement of B. Without the +1 from the carry-in, the result is one too small.
Why not another gate? XNOR inverts when M = 0, which is backwards for this job. AND forces the output to 0 when M = 0, and OR forces it to 1 when M = 1.
| Y | ||
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |