Addition (+)
21.11.10.1 Add (+)
Adds the data in two word addresses, or the data in a word address and a constant.
Subtraction (-)
21.11.10.2 Subtraction (-)
Subtracts the data between two word addresses, or the data in a word address and a constant.
Modulus (%)
21.11.10.3 Modulus (%)
Returns the remainder from a division operation on two word addresses, or a word address and constant.
Multiplication (*)
21.11.10.4 Multiplication (*)
Multiplies the data in two word addresses, or the data in a word address and a constant.
Division (/)
21.11.10.5 Division (/)
Divides the data in two word addresses, or the data in a word address and a constant.
Assignment (=)
21.11.10.6 Assignment (=)
Assign the value on the right hand side to the left hand side.
Shift Left (<<)
21.11.10.7 Shift Left (<<)
Shifts the data on the left side to the left by the number on the right side.
Shift Right (>>)
21.11.10.8 Shift Right (>>)
Shifts the data on the left side to the right by the number on the right side.
Bit Operator Logical AND (&)
21.11.10.9 Bit Operator Logical AND (&)
Performs logical AND of data between word devices, or between word device data and constant.
Bit Operator Logical OR (|)
21.11.10.10 Bit Operator Logical OR (|)
Performs logical OR of data between word devices, or between word device data and constant.
Bit Operator Exclusive OR (^)
21.11.10.11 Bit Operator Exclusive OR (^)
Performs exclusive OR of data between word devices, or between word device data and constant.
Bit Operator 1's Complement (~)
21.11.10.12 Bit Operator 1's Complement (~)
Inverts the bits.
Order of Precedence and Associativity
The following table shows the order of precedence of operators. If two or more operators have the same order of precedence, follow the direction shown by the associativity.
Priority |
Operator |
Associativity |
---|---|---|
High |
( ) |
→ |
|
not ~ |
← |
|
* / % |
→ |
|
+ - |
→ |
|
<< >> |
→ |
|
< <= > >= |
→ |
|
== <> |
→ |
|
& ^ | |
→ |
|
and or |
→ |
Low |
= |
← |