Logic
Perform AND, OR, XOR, NOT, NAND, and NOR logic on booleans.
What it does
Logic combines inputs A and B with a boolean operation: AND, OR, XOR, NAND, NOR or NOT. An input that is not already true/false is converted: a number counts as true above 0.5 and false otherwise, including negative numbers. NOT inverts A alone and ignores B.
When to use it
Two conditions combined into one result: A true AND B true
A condition inverted: NOT
An either/or test: OR for at least one, XOR for exactly one
A gate or mask built from several upstream checks such as compares and thresholds
| Parameter | Type | Default |
|---|---|---|
a | OneOf([Boolean, Number]) | — |
b | OneOf([Boolean, Number]) | — |
operation | String | "AND" |
Gotchas
Numbers plug straight in, with no separate compare step for a simple threshold.
NOT reads A only. B is still shown as an input and is ignored when the operation is NOT, so leave it unwired.
Anything that is not a boolean or a number reads as false. A colour, image or other non-numeric value wired in by mistake is treated as false rather than raising an error.
Worked example
Add a Logic node and set Operation to AND.
Wire two Compare results into A and B to test two conditions at once.
Feed the result into a Conditional node to choose between two values based on the combined test.
Switch Operation to NOT and use only A for the opposite of a single condition.
See also
Compare · Table · Conditional · Filter