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
1 ( )
2 NOT HIGH LOW
BYTE0 BYTE1 BYTE2 BYTE3
WORD0 WORD2
MBYTE
3 Unary + Unary -
4 * / MOD
5 + -
6 SHL SHR
7 AND OR XOR
8 EQ = NE <> LT < LTE <= GT > GTE >=

The Ax51 Assembler also supports the following C compatible operators. The C operators are identical with the corresponding Assembler operator are listed in the following table:

C Operator Identical Ax51 Operator
& AND
| OR
^
XOR
<< SHL
>> SHR
!= NE <>
  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.