More Boolean Operators
Using the three primary boolean operators (AND, NOT and OR) it is possible to derive a number of other operators, these are not unique - in the sense that they can be replicated by combining one or more of the primary operators in order to form them. Examples of these derived operators are XOR, NAND and NOR. Any set of operators which can be used to perform any desired operation is known as a functionally complete set, AND/OR/NOT is a functionally complete set since any derived operator can be formed from the base set. NAND and NOR are also individually functionally complete sets as either of them can be used to perform any operation.
XOR
, which would be said as "A exclusive or B equals C", can be calculated by use of a truth table.
XOR is an exclusive OR operation, meaning that C will be true if either A or B are true, but not both A and B. XOR is a derived operation, and by use of truth tables it is possible to prove that XOR is the same as an operation involving ANDs, NOTs and ORs. This is shown below:
NAND
is the formula for the NAND operation. This is essentially the inverse of a AND operation. The result of this can be shown in a truth table.
NAND is a useful operator because it is in itself a functionally complete set, meaning that any logic circuit can be constructed with just NAND gates, which can significantly cut the costs of circuit board manufacturing.
NOR
is the formula for the NOR operation. This is the boolean inverse of the OR operation, and the result of it is shown in a truth table.
NOR is another example of an operator which is by itself a functionally complete set, again making it very useful in efficient circuit board design.
Set Conversion
It is possible to convert between different functionally complete sets by following the three steps below (which are based on De Morgan's laws)
- Invert the input
- Change the gates, so AND becomes OR and OR becomes AND
- Invert the output
References:
- Janet Lavery - Durham University Computer Systems, Machine Architecture Lecture 1, 2007
- Janet Lavery - Durham University Computer Systems, Machine Architecture Lecture 2, 2007