Difference between revisions of "& (LogiX node)"
Jump to navigation
Jump to search
m (→Bitwise Number Operations: textual representation caption) |
|||
(6 intermediate revisions by 4 users not shown) | |||
Line 3: | Line 3: | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Logix Node | {{Infobox Logix Node | ||
− | |Name=& | + | | Name = & |
− | |Image=[[File:| | | + | | Image =[[File: AND_BoolNode.png | noframe | 128px | '&' LogiX node ]] |
− | |Input0Type= | + | | Input0Type = Bool | Input0Name = A |
− | |Input1Type= | + | | Input1Type = Bool | Input1Name = B |
− | |Output0Type= | + | | Output0Type = Bool | Output0Name = * |
}} | }} | ||
Line 14: | Line 14: | ||
== Usage == <!--T:3--> | == Usage == <!--T:3--> | ||
− | When spawned from the node browser, this node accepts the int datatype by default | + | When spawned from the node browser, this node accepts the int datatype by default, but it is more commonly used to work with Boolean values (True/False). The outputs will be True if, and only if, all inputs are True - otherwise it will output False. This node will accept some numeric datatypes, in which case it performs the operation in a [https://wikipedia.org/wiki/Bitwise_operation bitwise] manner. |
== Examples == <!--T:4--> | == Examples == <!--T:4--> | ||
+ | === Boolean Comparisons === | ||
+ | [[File:Logix_AND_Example_bool.png|500px|An example of the & Logix node being used compare bools.]] | ||
+ | |||
+ | === Bitwise Number Operations === | ||
+ | [[File:Logix_AND_Example_uint.png|500px|An example of the & Logix node being used to perform bitwise operations on an unsigned int.]] | ||
+ | |||
+ | A textual representation of the above image: | ||
+ | |||
+ | <nowiki> | ||
+ | 100101 | 37 | ||
+ | & 011111 | 23 | ||
+ | ------------- | ||
+ | 000101 | 5</nowiki> | ||
== Node Menu == <!--T:5--> | == Node Menu == <!--T:5--> | ||
</translate> | </translate> | ||
[[Category:LogiX{{#translation:}}|&]] | [[Category:LogiX{{#translation:}}|&]] | ||
− | [[Category:LogiX: | + | [[Category:LogiX:Operators{{#translation:}}|&]] |
− | {{:NodeMenu-Operators | + | {{:NodeMenu-Operators}} |
Latest revision as of 19:41, 5 September 2022
& | ||
---|---|---|
Inputs | ||
Bool | A | |
Bool | B | |
Outputs | ||
Bool | * |
The & node performs the logical AND operation on inputs A and B.
Usage
When spawned from the node browser, this node accepts the int datatype by default, but it is more commonly used to work with Boolean values (True/False). The outputs will be True if, and only if, all inputs are True - otherwise it will output False. This node will accept some numeric datatypes, in which case it performs the operation in a bitwise manner.
Examples
Boolean Comparisons
Bitwise Number Operations
A textual representation of the above image:
100101 | 37 & 011111 | 23 ------------- 000101 | 5