Boolean AND/OR/NOT

Symbol

Usage & working

The boolean operators apply common boolean operations to their input values.

Boolean operator

Input type

Functionality

Boolean operator

Input type

Functionality

AND

Multiple inputs

Logical conjunction: A ∧ B ∧ …

True when all inputs are true

OR

Multiple inputs

Logical disjunction: A ∨ B ∨ …

True when at least one input is true

NOT

Single input

Logical negation: ¬A

True when the input is false

In contrast to most components, the boolean operators use boolean values (true/false) instead of scalar values. To achieve interoperability with other control components a conversion to and from boolean values is done in the way described below.

Converting scalar values to boolean

Inputs for control components can in general be any real number. For the purpose of applying boolean operators we convert input values to boolean values in the way described by the table below. In short, input values of 0.5 or greater will be considered “true”.

Input value

Boolean value

Input value

Boolean value

(-∞, 0.5)

false

[0.5, +∞)

true

Converting boolean values to scalars

The boolean values are converted back to scalars after performing the boolean operations.

Boolean value

Output value

Boolean value

Output value

true

1.0

false

0.0

Examples

The output of the boolean “AND” operation is true when all inputs true. In terms of scalars, the output will be 1.0 if all inputs are at least 0.5. The output will be 0.0 otherwise.

The output of the boolean “OR” operation is true when at least one of the inputs is true.

The output of the boolean “NOT” operation is true when the single input is false.