Operator Precedence
Lowest binding at the top, highest at the bottom. Within a level, operators are left-associative unless noted.
| Level | Operators | Description | Associativity |
|---|---|---|---|
| 1 | <=> | Biconditional (iff) | right |
| 2 | => | Implication | right |
| 3 | ||, or | Logical disjunction | left |
| 4 | &&, and | Logical conjunction | left |
| 5 | !, not | Logical negation | prefix |
| 6 | ==, !=, <, <=, >, >=, in, subset | Comparison & membership | none |
| 7 | +, - | Addition, subtraction | left |
| 8 | *, /, % | Multiplication, division, modulo | left |
| 9 | &, |, ^ | Bitwise and, or, xor | left |
| 10 | <<, >>, >>> | Shift left, right, unsigned right | left |
| 11 | - (unary), ~ | Negation, bitwise complement | prefix |
Behavior-expression operators (||, +, ., *, guard) have their own precedence — see Process Calculus.