UI name in toolbox: logic_negate (Blockly built-in)

Definition: A NOT block inverts a Boolean condition. It returns true when the original condition is false, and vice versa.

Block type: Value block, output type Boolean

What it does: Reverses the boolean logic of a single condition.

How to build it:

  1. Drag logic_negate from the Logic category
  2. Connect a Boolean condition to the input socket

How it works:

  • Takes one condition as input
  • Returns the opposite of its truth value
  • TRUE becomes FALSE; FALSE becomes TRUE

When to use:

  • Inverting conditions (e.g., “NOT Task Finished” instead of creating the opposite)
  • Creating negative triggers
  • Simplifying complex logic

Example (Simple):
Connect: logic_negate with [task] finished inside
Result: TRUE while the task can still be answered; FALSE once task is finished

Example (Combining with other logic):
Block: (logic_negate[task 1] finished) AND timer > 5 min
Result: Triggers when Task 1 is NOT finished AND timer exceeds 5 minutes

Example (Edge Case – Double negation):
NOT (NOT Task Finished) = Task Finished
Result: Double negation cancels out, creating confusion; avoid this pattern

Notes:

  • Takes exactly one Boolean condition as input
  • Can be nested for complex logic (though not recommended for clarity)
  • Commonly used in deactivation logic

Common mistakes:

  • Using NOT on multiple conditions (use AND/OR blocks instead)
  • Creating double negation for unclear reasons
Tagged: