AND

Purpose:

Performs a logical AND of two expressions.

Syntax:

AND(val1, val2)

val1

-

A scalar, series, or table.

val2

-

A scalar, series, or table.

Returns:

A scalar, series, or table.

Example:

and(W1, W2)

 

returns a series or table with zeros at points where either W1 or W2 contain a zero, and ones where both W1 and W2 have non-zero values.

Example:

and({0, 1, 5, 9},1)

 

returns a series {0,1,1,1}. This is equivalent to: {0, 1, 5, 9} && 1

Remarks:

AND can also be performed using the infix operator &&. The function AND(W1, W2) is identical to the expression (W1 && W2).

 

See & to perform a bitwise AND operation.

See Also:

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

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

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

FLIPFLOP

NOT

OR

XOR