The FixPt Logical Operation block is a masked S-function that performs the specified logic on its inputs. An input value is TRUE (1) if it is nonzero and FALSE (0) if it is zero.
The logic connecting the inputs is selected with theOperator pull-down menu. The supported logical operations are given below.
Logical Operator
Description
AND
TRUE if all inputs are TRUE
OR
TRUE if at least one input is TRUE
NAND
TRUE if at least one input is FALSE
NOR
TRUE when no inputs are TRUE
XOR
TRUE if an odd number of inputs are TRUE
NOT
TRUE if the input is FALSE
The number of input ports is specified with the Number of input ports parameter. The output type is specified with the Logical output data type parameter. An output value is 1 if TRUE and 0 if FALSE.
Note:
The Logical output data type selected should represent zero exactly. Data types that satisfy this condition include signed and unsigned integers and any floating-point data type.
The size of the output depends on the number of inputs, their vector size, and 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.
The block icon displays the logic to be performed on the inputs. For a description of how the block icon displays the output data type, refer to "Block Icon Display".
Parameters and Dialog Box
Operator
Logical operator used to connect the inputs.
Number of input ports
Number of inputs.
Logical output data type
Output data type. You should only use data types that represent zero exactly.
Characteristics
Input Port(s)
Any data type supported by the blockset
Output Port
Any data type supported by the blockset that can exactly represent zero