This documentation is out of date.
The new version of the documentation is here: https://cannylogic.com/docs |
Difference between revisions of "Negation"
From CANNY Wiki
[unchecked revision] | [unchecked revision] |
(initial edit) |
|||
(13 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
{|class="cannytable" width="350px" | {|class="cannytable" width="350px" | ||
|- | |- | ||
− | !colspan="2" style="background-color:#AFEEEE;"| | + | !colspan="2" style="background-color:#AFEEEE;"|Appearance |
|- | |- | ||
− | |colspan="2" align="center" style="padding:10px;"|[[ | + | |colspan="2" align="center" style="padding:10px;"|[[File:5_3_1_2.png]] |
|- | |- | ||
− | !colspan="2" style="background-color:#AFEEEE;"| | + | !colspan="2" style="background-color:#AFEEEE;"|Symbol |
|- | |- | ||
|colspan="2" align="center"|NOT X | |colspan="2" align="center"|NOT X | ||
|- | |- | ||
− | !colspan="2" style="background-color:#AFEEEE;"| | + | !colspan="2" style="background-color:#AFEEEE;"|Group |
|- | |- | ||
− | |colspan="2" align="center"|[[ | + | |colspan="2" align="center"|[[Built-in Function Blocks#Logical operators | Logical operators]] |
|- | |- | ||
− | !colspan="2" style="background-color:#AFEEEE;"| | + | !colspan="2" style="background-color:#AFEEEE;"|Inputs |
|- | |- | ||
− | |style="padding-left:1em;"| | + | |style="padding-left:1em;"|Value: |
− | |style="padding-left:1em;"|[[ | + | |style="padding-left:1em;"|[[CFD Language#Data|Logical]] |
|- | |- | ||
− | !colspan="2" style="background-color:#AFEEEE;"| | + | !colspan="2" style="background-color:#AFEEEE;"|Outputs |
|- | |- | ||
− | |style="padding-left:1em;"| | + | |style="padding-left:1em;"|Result: |
− | |style="padding-left:1em;"|[[ | + | |style="padding-left:1em;"|[[CFD Language#Data|Logical]] |
|- | |- | ||
− | !colspan="2" style="background-color:#AFEEEE;"| | + | !colspan="2" style="background-color:#AFEEEE;"|Version [[CANNY Lab]] |
|- | |- | ||
− | |colspan="2" align="center"| | + | |colspan="2" align="center"|from 0.6b |
|} | |} | ||
</div> | </div> | ||
Line 34: | Line 34: | ||
<div style="min-height:100%;display:block;"> | <div style="min-height:100%;display:block;"> | ||
<div style="float:left;width:70px;"> | <div style="float:left;width:70px;"> | ||
− | [[ | + | [[File:5_3_1_1.png|left|Icon]] |
</div> | </div> | ||
<div> | <div> | ||
− | + | A function block used for logical negation. Sets an output value to the the logical inversion of the input. | |
</div> | </div> | ||
</div> | </div> | ||
<br clear="left"> | <br clear="left"> | ||
− | + | In other words, the output will be: | |
− | * | + | * "1" if and only if the input is "0", |
− | * | + | * "0" if and only if the input is "1". |
− | + | Thus, the [//en.wikipedia.org/wiki/Truth_table Truth table] of the operation looks as follows: | |
{|border="1" style="border-collapse:collapse;" | {|border="1" style="border-collapse:collapse;" | ||
|- | |- | ||
− | |style="padding:5px;"| | + | |style="padding:5px;"|Value |
− | |style="padding:5px;"| | + | |style="padding:5px;"|Result |
|- | |- | ||
|align="center"|0 | |align="center"|0 | ||
Line 60: | Line 60: | ||
|} | |} | ||
− | == | + | == Features == |
− | + | Using 'Negation' is equivalent to applying [[CFD Language#Function Block|logical inversion]] to the value of any function block input or output. | |
− | == | + | == Examples== |
{| | {| | ||
− | |[[ | + | |[[File:5_3_1_3.png|thumb|Example 1]] |
| | | | ||
− | |[[ | + | |[[File:5_3_1_4.png|thumb|Example 2]] |
|} | |} | ||
− | == | + | == See also == |
− | [[ | + | [[Logical AND]] |
− | [[ | + | [[Logical OR]] |
− | [[ | + | [[Exclusive OR]] |
− | [[ | + | [[Built-in_Function_Blocks | Built-in Function Blocks]] |
Latest revision as of 14:56, 13 December 2020
Appearance | |
---|---|
Symbol | |
NOT X | |
Group | |
Logical operators | |
Inputs | |
Value: | Logical |
Outputs | |
Result: | Logical |
Version CANNY Lab | |
from 0.6b |
A function block used for logical negation. Sets an output value to the the logical inversion of the input.
In other words, the output will be:
- "1" if and only if the input is "0",
- "0" if and only if the input is "1".
Thus, the Truth table of the operation looks as follows:
Value | Result |
0 | 1 |
1 | 0 |
Features
Using 'Negation' is equivalent to applying logical inversion to the value of any function block input or output.