Stateflow    

Binary Operations

Binary operations fall into these categories.

Numerical

Example
Description
a + b
Addition of two operands
a - b
Subtraction of one operand from the other
a * b
Multiplication of two operands
a / b
Division of one operand by the other
a %% b
Modulus

Logical

(The default setting; bit operations are not enabled.)

Example
Description
a == b
Comparison of equality of two operands
a & b
a && b
Logical AND of two operands
a | b
a || b
Logical OR of two operands
a ~= b
a != b
Comparison of inequality of two operands
a > b
Comparison of the first operand greater than the second operand
a < b
Comparison of the first operand less than the second operand
a >= b
Comparison of the first operand greater than or equal to the second operand
a <= b
Comparison of the first operand less than or equal to the second operand

Logical

(Bit operations are enabled.)

Example
Description
a == b

Comparison of equality of two operands

a && b

Logical AND of two operands

a & b
Bitwise AND of two operands
a || b
Logical OR of two operands
a | b
Bitwise OR of two operands
a ~= b
a != b
a <> b
Comparison of inequality of two operands
a > b
Comparison of the first operand greater than the second operand
a < b
Comparison of the first operand less than the second operand
a >= b
Comparison of the first operand greater than or equal to the second operand
a <= b
Comparison of the first operand less than or equal to the second operand
a ^ b
Bitwise XOR of two operands


 Bit Operations Unary Operations