NOT

Operator - Performs a boolean negation of the input.

Inputs

IN : BOOL  Boolean value

Outputs

Q : BOOL   Boolean negation of the input

Truth table

IN

Q

0

1

1

0

Remarks

In FBD language, the block "NOT" can be used. Alternatively, you can use a link terminated by a "o" negation. In LD language, negated contacts and coils can be used. In IL language, the "N" modifier can be used with instructions LD, AND, OR, XOR and ST. It represents a negation of the operand. In ST language, NOT can be followed by a complex boolean expression between parenthesis.

ST Language

Q := NOT IN;
Q := NOT (IN1 OR IN2);

FBD Language

(* explicit use of the "NOT" block *)
NotFbd1.gif (1141 octets)
(* use of a negated link: Q is IN1 AND NOT IN2 *)
NotFbd2.gif (1210 octets)

LD Language

(* Negated contact: Q is: IN1 AND NOT IN2 *)
NotLd1.gif (1185 octets)

(* Negated coil: Q is NOT (IN1 AND IN2) *)
NotLd2.gif (1180 octets)

IL Language:

Op1: LDN IN1
     OR  IN2
     ST  Q   (* Q is equal to: (NOT IN1) OR IN2 *)
Op2: LD  IN1
     AND IN2
     STN Q   (* Q is equal to: NOT (IN1 AND IN2) *)

See also

AND   OR   XOR