| title | Expressions with Binary Operators | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | language-reference | |||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | 6dea3df4-a4bd-42c3-9807-4a27c120ac9a | |||||||||||||
| caps.latest.revision | 7 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
Binary operators act on two operands in an expression. The binary operators are:
-
-
Multiplication (*)
-
Division (/)
-
Modulus (%)
-
-
-
Addition (+)
-
Subtraction (-)
-
-
-
Right shift (>>)
-
Left shift (<<)
-
-
Relational and equality operators
-
Less than (<)
-
Greater than (>)
-
Less than or equal to (<=)
-
Greater than or equal to (>=)
-
Equal to (==)
-
Not equal to (!=)
-
-
Bitwise operators
-
Logical operators
-
-
Assignment (=)
-
Addition assignment (+=)
-
Subtraction assignment (-=)
-
Multiplication assignment (*=)
-
Division assignment (/=)
-
Modulus assignment (%=)
-
Left shift assignment (<<=)
-
Right shift assignment (>>=)
-
Bitwise AND assignment (&=)
-
Bitwise exclusive OR assignment (^=)
-
Bitwise inclusive OR assignment (|=)
-
-
Comma Operator (,)