Keil Logo

Operators

Operators may be unary (requiring one operand) or binary (requiring two operands). The combination of an operator and its operand(s) is an expression. Parentheses may be used in expressions with multiple operators to specify the order in which operators are evaluated. If no parentheses are used in an expression, operator precedence determines the evaluation order.

Following is the operator precedence table:

Level Operators
0 ( )
1 .
3 HIGH LOW
BYTE0 BYTE1 BYTE2 BYTE3 BYTE4 BYTE5 BYTE6 BYTE7
WORD0 WORD2 WORD4 WORD6
NOT ! Unary + Unary -
4 * / % MOD
5 + -
6 SHL << SHR >>
7 AND & OR | XOR ^
8 EQ == NE != <<b>LT < LE <= GT > GE >=
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.