A logic gate is the base element of circuits and implements a boolean function.
Each gate takes one or more input and produces one output that is either HIGH (value 1) or LOW (value 0).
name | function | description |
---|---|---|
AND | \(f=x \cdot y\) | HIGH when all inputs are HIGH, otherwise LOW |
OR | \(f=x+y\) | HIGH when at least one input is HIGH |
NOT (inverter) | \(f = \overline x\) | HIGH when the input is LOW, or LOW when the input is HIGH |
Each of these base gates implement a core operation of Boolean algebra.
name | function | description |
---|---|---|
XOR | \(f=x \oplus y = x \cdot \overline y + \overline x \cdot y\) | HIGH only when the inputs differ |
NAND | \(f = x \uparrow y = \overline{x \cdot y}\) | equivalent to “not AND” |
NOR | \(f = x \downarrow y = \overline{x + y}\) | equivalent to “not OR” |
XNOR | \(f = x \odot y = \overline{x \oplus y}\) | equivalent to “not XOR” |
AND
, OR
, XOR
, and XNOR
are all commutative and associative, they may be extended trivially to more than two inputs.
NAND
and NOR
operations are both commutative, but are not associative.
NOT
always operates on a single input.