Logical Operations

AND

AND(x1, x2, …)

Returns the bitwise Logical And of all parameters. Bit i is set in the result if bit i is set in all parameters. The AND function can have an arbitrary number of parameters, but has to have at least one.

The function is overloaded for any bitstring type. The smallest common bitstring type is used as return type.

OR

OR(x1, x2, …)

Returns the bitwise Logical Or of all parameters. Bit i is set in the result if bit i is set in at least one of all parameters. The OR function can have an arbitrary number of parameters, but has to have at least one.

The function is overloaded for any bitstring type. The smallest common bitstring type is used as return type.

XOR

XOR(x1, x2, …)

Returns the bitwise Logical Exclusive Or of all parameters. Bit i is set in the result if bit i is set in an uneven number of all parameters. The XOR function can have an arbitrary number of parameters, but has to have at least one.

The function is overloaded for any bitstring type. The smallest common bitstring type is used as return type.

NOT

NOT(x)

Returns the bitwise complement of x. Bit i is set in the result if bit i is not set in x.

The function is overloaded for any bitstring type. The type of x is used as return type.