Keil Logo

Addition, subtraction, and logical operators

7.24 Addition, subtraction, and logical operators

Addition, subtraction, and logical operators act on numeric expressions.

Logical operations are performed bitwise, that is, independently on each bit of the operands to produce the result.
The following table shows the addition, subtraction, and logical operators:

Table 7-6 Addition, subtraction, and logical operators

Operator
Alias
Usage
Explanation
+
 
A+B
Add A to B
-
 
A-B
Subtract B from A
:AND:
&
A:AND:B
Bitwise AND of A and B
:EOR:
^
A:EOR:B
Bitwise Exclusive OR of A and B
:OR:
 
A:OR:B
Bitwise OR of A and B
The use of | as an alias for :OR: is deprecated.
Related concepts
Non-ConfidentialPDF file icon PDF versionARM DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  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.