Addition, subtraction, and logical operators

Addition and subtraction operators act on numeric expressions.

Logical operators act on numeric expressions. The operation is performed bitwise, that is, independently on each bit of the operands to produce the result.

Table 32 shows addition, subtraction, and logical operators.

Table 32. 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.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0473C
Non-ConfidentialID080411