Basic logic functions
This section presents the basic logic functions, also called logic gates, which will be used later on in order to construct more complex functions.
The Inverter (NOT)
Description
The output is if and only if the input is .
Truth table
e | s |
---|---|
Equation
Another common symbol to denote the negation of a variable is .
Symbol
The AND Gate
Description
The output is if and only if both inputs equal . 1
Truth table
a | b | s |
---|---|---|
Equation
In this lecture, we use the operator to denote conjunction (the AND operation). It is not to be confused with multiplication of integers or reals. But, as will become more clear in the next chapter, both share some common properties. Another common symbol for the conjunction is .
Symbol
The OR Gate
Description
The output is if and only if both inputs equal .2
Truth table
a | b | s |
---|---|---|
Equation
In this lecture, we use the operator to denote disjunction (the OR operation). It is not to be confused with addition of integers or reals (again, both share some common properties). Another common symbol for the conjunction is .
Symbol
The NAND (not AND) Gate
Truth table
Description
This is the complementary function of AND. The output is if and only if both inputs equal .
Truth table
a | b | s |
---|---|---|
Equation
Symbol
The NOR (not OR) Gate
Description
This is the complementary function of the OR. The output is if and only if both inputs are .
Truth table
a | b | s |
---|---|---|
Equation
Symbol
Exclusive OR (XOR)
Description
The output is if one, and only one, of the two inputs is . 3
Truth table
a | b | s |
---|---|---|
Equation
Symbol
Exclusive NOT OR (XNOR)
Description
This is the complementary function of the exclusive OR. The output is if and only if both inputs are equal.
Truth table
a | b | s |
---|---|---|
Equation
Symbol
The AND function can also be interpreted as a function of forcing a signal to zero: in the expression , the signal is equal to only if , otherwise it is 0.
The OR function can also be interpreted as a function of forcing a signal to one: in the expression , the signal is equal to only if otherwise it is 1.
The exclusive OR function can also be interpreted as a selection function between a datum and its complementary: in the expression , the signal is equal to if otherwise it is