| Arithmetic Operators | ||
| Operator | Meaning | Example |
| + | Addition (Numbers) | 5+3 results in 8 |
| + | Concatenation (Strings) | "Hello " + "world" results in "Hello world" |
| - | Subtraction | 5-3 results in 2 |
| * | Multiplication | 6*2 results in 12 |
| / | Division | 6/2 results in 3 |
| % | Modulo | 6%3 results in 0 |
| ++ | Increment | i++; // Increments variable i by one |
| -- | Decrement | i--; // Decrements variable i by one |
|
Relational Operators | ||
| Operator | Meaning | Example |
| == | Equality | 5==3 returns false |
| != | Not Equal | 5!=3 returns true |
| < | Less Than | 5<3 returns false |
| <= | Less Than or Equal | 5<=3 returns false |
| > | Greater Than | 5>3 returns true |
| >= | Greater Than or Equal | 5>=3 returns true |
|
Logical Operators | ||
| Operator | Meaning | Example |
| && | And | true && false returns false |
| || | Or | true || false returns true |
| ! | Not | !true returns false |
|
Bitwise Operators | ||
| Operator | Meaning | Example |
| & | Bitwise AND | 0x0001 & 0x1001 returns 0x0001 |
| | | Bitwise OR | 0x0001 | 0x1001 returns 0x1001 |
| ^ | Bitwise XOR | 0x0001 ^ 0x1001 returns false 0x1000 |
| ~ | Bitwise NOT | ~0x0001 returns 0xFFFE |
| << | Shift Left | 0x0001 << 1 returns 0x0002 |
| >> | Shift Right | 0x0001 >> 1 returns 0x0000 |