Sign | Name | Operation on X and Y |
---|---|---|
+ | Addition | X + Y = 30 |
- | Subtraction | X - Y = -10 |
* | Multiplication | X * Y = 200 |
/ | Division | Y / X = 2 |
% | Modulus | Y % X = 0 |
++ | Increment - Increases the value of operand by 1 | Y++ = 21 |
-- | Decrement - Decreases the value of operand by 1 | Y-- = 19 |
Operator | Working |
---|---|
== | Compare the equality of two operands. If found YES, answer will true. |
!= | Compare the equality of two operands. If NOT found, answer will true. |
> | Checks the value of the left operand is greater than the value of right operand. |
< | Checks the value of left operand is less than the value of right operand. |
>= | Checks the value of left operand is ">" greater than or equal to the value of right operand. |
<= | Checks the value of left operand is "<" less than or equal to the value of right operand. |
Operation | Value in Binary | Value in Decimals |
---|---|---|
x | 00111100 | 60 |
y | 00001101 | 13 |
x & y | 00001100 | 12 |
x | y | 00111101 | 61 |
x ^ y | 00110001 | 49 |
Name | Sign |
---|---|
AND operator | && |
OR Operator | || |
NOT Operator | ! |
Operator Sign | Operator Working | |
---|---|---|
= | Assignment operator: assign value/result to left operand of right operand(s). | X = Y + Z |
+= | Add value/result right operand(s) to left operand and then assign value to left operand. |
X += Y is equal to X = X + Y |
-= | Subtract value/result right operand(s) to left operand and then assign value to left operand. |
X -= Y is equal to X = X – Y |