Skip to content

NOT

Takes a boolean data type and computs logical NOT operation on them. Params: default : Boolean The input boolean to which we apply the NOT operation. Returns: out : Boolean The boolean result from the operation of the input.
Python Code
from flojoy import flojoy, Boolean


@flojoy
def NOT(default: Boolean) -> Boolean:
    """Takes a boolean data type and computs logical NOT operation on them.

    Parameters
    ----------
    default : Boolean
        The input boolean to which we apply the NOT operation.

    Returns
    -------
    Boolean
        The boolean result from the operation of the input.
    """
    reverse = not default.b
    return Boolean(b=reverse)

Find this Flojoy Block on GitHub

Example

Having problems with this example app? Join our Discord community and we will help you out!
React Flow mini map

In this example, BOOLEAN node generates false. Apply NOT opperator on it and it returns true.

Visualize it using TEXT_VIEW node.