Having mastered the two-input gates, we can now extend this to three input gates. LogicSim lets you right-click on such a gate and with "Add input" and "Remove input" lets you change the number of inputs from 2 to 5.
For AND and OR this extension to three inputs is very intuitive, but for XOR it's not quite so obvious what it means.
| Gate | Truth | Description | Equivalent |
|---|---|---|---|
| AND | 000|0 | 1 if all inputs are 1 | ![]() |
| OR | 000|0 | 1 if any of the inputs are 1 | ![]() |
| XOR | 000|0 | 1 if an odd number of inputs are 1 | ![]() |
If you have the idea of XOR as "OR but without the AND" (a OR b AND NOT (a AND b)), then it's not obvious how to extend this to three inputs. Similarly if you think of it as "inputs are different" then it's not clear what it would be with three. If instead you think of XOR as "exactly one of the inputs is high" then a three-input XOR gate becomes "one or three of the inputs is high", or "odd parity". Then an XNOR is not "all of the inputs are equal" but "an even number of inputs is high".
For the inverted gates NAND, NOR and XNOR, there are different ways to build them out of simpler gates, but it's common to use a NAND as an inverter if you've got other NANDs in the same circuit, and to use a NOR as an inverter if you've already got NORs. Building an XNOR like this is not quite so common!
| NAND | 000|1 | 0 if all inputs are 1 | ![]() |
| NOR | 000|1 | 0 if any of the inputs are 1 | ![]() |
| XNOR | 000|1 | 1 if an even number of inputs are 1 | ![]() |