Send
Close Add comments:
(status displays here)
Got it! This site "creationpie.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website. Note: This appears on each machine/browser from which this site is accessed.
NAND operator
1. NAND operator
The logical NAND operation is the "NOT AND" operation.
Every logical operation can be formed using NAND operations.
Claude Shannon showed that a computer can be built of logic gates. Thus, a computer can be built from NAND gates.
In programming language theory, this process is called a structural induction. It is (initially) much easier to build hardware that has only one physical part, suitably connected. In proving properties and in implementing program languages, it is easier to do the proof for just a small selected subset of possible constructs. Any combined construct is thus already handled.
One of these equivalences is shown here.
2. Nand operator
The Nand, for negative-and, operator is expressed as follows.
X !& Y
3. Extended truth table
Here is the extended truth table.
X Y | X !& Y
------------
0 0 | 0 1 0
0 1 | 0 1 1
1 0 | 1 1 0
1 1 | 1 0 1
4. JSON prefix tree
Here is a one way to represent a pretty-printed prefix tree in JSON list form.
["op2","nand",
["var","X"],
["var","Y"]
]
5. Equivalence
The logical and "
&" is equivalent to the following.
X Y | ( X !& Y ) !& ( X !& Y )
------------------------------
0 0 | ( 0 1 0 ) 0 ( 0 1 0 )
0 1 | ( 0 1 1 ) 0 ( 0 1 1 )
1 0 | ( 1 1 0 ) 0 ( 1 1 0 )
1 1 | ( 1 0 1 ) 1 ( 1 0 1 )
6. JSON prefix tree
Here is a one way to represent a pretty-printed prefix tree in JSON list form.
["op2","nand",
["op2","nand",
["var","X"],
["var","Y"]
],
["op2","nand",
["var","X"],
["var","Y"]
]
]
7. Proof
Here is the proof.
X Y | ( X & Y ) = ( ( X !& Y ) !& ( X !& Y ) )
----------------------------------------------
0 0 | ( 0 0 0 ) 1 ( ( 0 1 0 ) 0 ( 0 1 0 ) )
0 1 | ( 0 0 1 ) 1 ( ( 0 1 1 ) 0 ( 0 1 1 ) )
1 0 | ( 1 0 0 ) 1 ( ( 1 1 0 ) 0 ( 1 1 0 ) )
1 1 | ( 1 1 1 ) 1 ( ( 1 0 1 ) 1 ( 1 0 1 ) )
8. JSON prefix tree
Here is a one way to represent a pretty-printed prefix tree in JSON list form.
["op2","eq",
["op2","and",
["var","X"],
["var","Y"]
],
["op2","nand",
["op2","nand",
["var","X"],
["var","Y"]
],
["op2","nand",
["var","X"],
["var","Y"]
]
]
]
9. End of page