DADiSP Worksheet Functions > Function Categories > Binary Series > NOT

 

NOT

Purpose:

Performs a logical NOT.

Syntax:

NOT(val)

val

-

A scalar, series or table.

Returns:

A scalar, series, or table.

Example:

not(W1)

 

returns a table or series with ones where W1 contains zeros, and zeros where W1 contains non zero values.

 

not({1, 2, 0})

 

returns {0, 0, 1}.

Remarks:

The NOT function can also be performed using the ! character. The expression not(W1) is identical in effect to !W1. However, NOT is particularly useful for macro, SPL, command files, and menu creation, as the "!" character also indicates a single line comment.

 

See ~ to perform a bitwise complement function.

See Also:

< <= > >= == != (Conditional Operators)

&& || ! AND OR NOT XOR (Logical Operators)

>> << & ~ |+ |^ (Bit Operators)

AND

FLIPFLOP

NEGATE

NOTEQUAL

OR

XOR