Block Inputs: Scalar.

The xor block produces the bitwise exclusive OR of 2 – 256 scalar input signals.

If you right-click the xor block, the Boolean block menu appears allowing you to assign a different function to the block.


1. Using the xor block

Consider a variable y such that:

If a ≥ 4 or c ≤ 5, then y = cos(t); else y = 0. Also, if a ≥ 4 and c ≤ 5, y = 0

where t is simulation time. Furthermore, let t be the input to parameters a and c. This system can be realized as shown below.

As shown in the two plot blocks, the output of the xor block evaluates to false in the interval t = (4, 5), since both the inputs to the xor block are true in this interval. Consequently, y takes on the value of 0. The output of xor evaluates to true in the remaining parts of the simulation, and as a result, y takes on the value of cos(t) in these periods.