The odd function of several inputs outputs 1 when an odd number of them are 1, and 0 otherwise. For three inputs it is : 1 for one 1 or for three 1s.
It is exactly what a multi-input XOR computes, and it is the basis of parity checking.
Useful facts:
- It is 1 in exactly half the rows of its truth table: 4 of 8 rows for three inputs, 8 of 16 for four.
- Flipping any single input always flips the output. No input can ever be ignored.
- On a karnaugh map its 1s form a checkerboard. No two 1s are adjacent, so it can't be simplified: the minimal SOP is just the list of minterms.
- Its complement is the even function.
How to build one: XOR the inputs together with 2-input XOR gates, as a chain or a tree. Order doesn't matter.
A trap: chaining 2-input XNOR gates also gives an odd or even function, depending on how many you use. Each XNOR adds one inversion, so two chained XNORs (three inputs) give back the odd function, .
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |