Using Simulink     Search    Help Desk 
Logical Operator

Perform the specified logical operation on the input.

Library

Math

Description

The Logical Operator block performs any of these logical operations on its inputs: AND, OR, NAND, NOR, XOR, and NOT. The output depends on the number of inputs, their vector size, and the selected operator. The output is 1 if TRUE and 0 if FALSE. The block icon shows the selected operator.

When configured as a multi-input XOR gate, this block performs an addition modulo two operation as mandated by the IEEE standard for logic elements.

Data Type Support

An Logical Operator block accepts signals of type boolean on its input ports, unless boolean compatibility mode is enabled (see "Enabling Strict Boolean Type Checking"), in which case the block also accepts inputs of type double. A nonzero input of type double is treated as TRUE (1), a zero input as FALSE (0). All inputs must be of the same type. The output of the block is of the same type as the input.

Parameters and Dialog Box

Operator
The logical operator to be applied to the block inputs. Valid choices are the operators listed above.
Number of input ports
The number of block inputs. The value must be appropriate for the selected operator.

Characteristics

Direct Feedthrough
Yes
Sample Time
Inherited from driving block
Scalar Expansion
Of inputs
Vectorized
Yes
Zero Crossing
No



[ Previous | Help Desk | Next ]