The even function of several inputs outputs 1 when an even number of them are 1, including none. For three inputs it is : 1 for zero 1s or two 1s.
It is the complement of the odd function, so in every row exactly one of the two is 1.
Ways to build it:
- A multi-input XNOR gate, meaning a multi-input XOR with one bubble on its output.
- A tree of XORs with a single inverter at the end.
- For two inputs, a single XNOR: is 1 when A and B are both 0 or both 1, which is zero or two 1s.
Be careful with chains of 2-input XNORs. Each XNOR adds an inversion, so the result depends on how many you use:
- 3 inputs need 2 XNORs. Two inversions cancel, so the chain gives the odd function.
- 4 inputs need 3 XNORs. Three inversions leave one, so the chain gives the even function.
The even function is what a receiver checks in an even-parity scheme: if all received bits, data plus parity, have an even count of 1s, the data is assumed good.
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |