Difference between revisions of "& (LogiX node)"
Jump to navigation
Jump to search
(Created page with "Output is True if ALL inputs are true, else output is false") |
m (→Bitwise Number Operations: textual representation caption) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | <languages></languages> | |
+ | <translate> | ||
+ | <!--T:1--> | ||
+ | {{Infobox Logix Node | ||
+ | | Name = & | ||
+ | | Image =[[File: AND_BoolNode.png | noframe | 128px | '&' LogiX node ]] | ||
+ | | Input0Type = Bool | Input0Name = A | ||
+ | | Input1Type = Bool | Input1Name = B | ||
+ | | Output0Type = Bool | Output0Name = * | ||
+ | }} | ||
+ | |||
+ | <!--T:2--> | ||
+ | The '''&''' node performs the logical AND operation on inputs A and B. | ||
+ | |||
+ | == Usage == <!--T:3--> | ||
+ | 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--> | ||
+ | === 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--> | ||
+ | </translate> | ||
+ | [[Category:LogiX{{#translation:}}|&]] | ||
+ | [[Category:LogiX:Operators{{#translation:}}|&]] | ||
+ | {{: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