 Xor - MapleSim Help

Xor

Logical xor of inputs  Description

Compute the exclusive-or of the inputs. Two definitions of exclusive-or are supported:

 1 If the Compute parity parameter is $\mathrm{false}$ (the default), the output is $\mathrm{true}$ if exactly one input is $\mathrm{true}$, otherwise the output is $\mathrm{false}$.
 2 If the Compute parity parameter is $\mathrm{true}$, the output is $\mathrm{true}$ if an even number of inputs are $\mathrm{true}$, otherwise the output is $\mathrm{false}$.

The Use vector boolean parameter selects the type of inputs.

 • If $\mathrm{false}$ (the default), the block has two boolean inputs, $\mathrm{u1}$ and $\mathrm{u2}$.
 • If $\mathrm{true}$, the block has a single boolean vector input, $u$, and the Signal size parameter sets the dimension of $u$. Signal size must be greater than $1$. Connections

 Name Description Modelica ID $\mathrm{u1}$ Boolean input signal 1 u1 $\mathrm{u2}$ Boolean input signal 2 u2 $y$ Boolean output signal y $u$ Boolean input vector u Parameters

 Name Default Units Description Modelica ID Use vector $\mathrm{false}$ True (checked) means use a single boolean vector input; otherwise use two scalar boolean inputs useVector Signal size $2$ Dimension of the vector input signal (n>1) signalSize Compute parity $\mathrm{false}$ True (checked) means return $\mathrm{true}$ if and only if an even number of inputs are $\mathrm{true}$; otherwise, return $\mathrm{true}$ if and only if exactly one input is $\mathrm{true}$ computeParity Modelica Standard Library The component described in this topic is from the Modelica Standard Library. To view the original documentation, which includes author and copyright information, click here.