Update
This commit is contained in:
parent
baca171ff8
commit
997823cb0d
23 changed files with 1896 additions and 1873 deletions
|
@ -58,7 +58,7 @@ The truth table of these gates is as follows:
|
|||
|
||||
*symbols often used for logic gates*
|
||||
|
||||
Functions NAND and NOR are so called [functionally complete](functional_completeness.md) which means we can implement any other gate with only one of these gates. For example NOT(x) = NAND(x,x), AND(x,y) = NAND(NAND(x,y),NAND(x,y)), OR(x,y) = NAND(NAND(x,x),NAND(y,y)) etc. Similarly NOT(x) = NOR(x,x), OR(x,y) = NOR(NOR(x,y),NOR(x,y)) etc.
|
||||
Functions NAND and NOR are [functionally complete](functional_completeness.md) which means we can implement any other gate with only one of these gates. For example NOT(x) = NAND(x,x), AND(x,y) = NAND(NAND(x,y),NAND(x,y)), OR(x,y) = NAND(NAND(x,x),NAND(y,y)) etc. Similarly NOT(x) = NOR(x,x), OR(x,y) = NOR(NOR(x,y),NOR(x,y)) etc. NAND and NOR are the only two functions that are functionally complete by themselves, but there are more functionally complete sets of multiple functions, for example OR together with NOT can also implement any other function (which can be seen from the fact that we can implement NOR as NOT(OR(x,y), and we know NOR is already functionally complete). More detail on this will follow below.
|
||||
|
||||
## More Detail On Boolean Functions
|
||||
|
||||
|
@ -191,10 +191,12 @@ Comments on the table:
|
|||
- The *comm* and *assoc.* rows say if the function is [commutative](commutativity.md) (result is the same with swapped arguments) and [associative](associativity.md) (result doesn't depend on bracketing, i.e. order of evaluation) respectively.
|
||||
- The *dual*, *neg.* and *adj.* say the dual function (equivalent via De Morgan's laws, i.e. its truth table is flipped vertically and negated), negated function (function that gives the same results, just negated) and adjoint function (function giving the same results if we flip the arguments, i.e. its truth table has the middle two rows flipped vertically) respectively.
|
||||
- The bigger part of the table shows how the function is implemented when we're limited to any of the 26 existing functionally complete sets of functions (of course there exist many ways, here we show hopefully one of the most minimal expressions). This shows that we can implements ALL of the 16 functions using as few as one single function (NAND or NOR).
|
||||
- Formally all functions here take exactly two input variables, but effectively some of them (namely !X, !Y, X, Y, 0 and 1) behave as [nullary](nullary.md) or [unary](unary.md) functions (have arity 0 or 1) because they ignore one or both inputs. Out of convenience we treat them accordingly in our notation, i.e. for example we'll write just `0` instead of `X0Y` or `!X` instead of `X!Y`, and consequently in our expressions we see `!` as a single unary function to which we feed just one argument, but just keep in mind that eventually `!` is actually secretly two functions: `!X` and `!Y`.
|
||||
- Notice patterns in the table, i.e. that adjoint functions such as `<` and `>` use the same formula just with *X* and *Y* switched, that the negated function of a function is always the one that's mirrored by the table center etc.
|
||||
|
||||
## See Also
|
||||
|
||||
- [logic circuit](logic_circuit.md)
|
||||
- [quantum gate](quantum_gate.md)
|
||||
- [bit hack](bit_hack.md)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue