# <!-- var kmNextPage = "armclang_ref_dom1359731182259.htm"; var kmPrevPage = "armclang_ref_dom1359731181541.htm"; var kmNextPageTitle = "Relational operators"; var kmPrevPageTitle = "Shift operators"; var kmBreadCrumbs = "<a href=\"default.htm\">Home</a> &raquo; <a href=\"armclang_ref_ibj1564391772668.htm\">armasm Legacy Assembler Reference</a> &raquo; <a href=\"armclang_ref_dom1359731172022.htm\">Symbols, Literals, Expressions, and Operators in a</a> &raquo; Addition, subtraction, and logical operators"; kmSetupPaging (); kmNavButtons(); //--> Addition, subtraction, and logical operators

## F5.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 F5-6 Addition, subtraction, and logical operators

Operator

Alias

Usage

Explanation

+

A+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.

##### Important information

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