The Visual Basic operators fall into five main categories: arithmetic, concatenation, comparison, logical, and bitwise. The following sections explain these categories and the operators they contain. The end of this appendix describes special Date and TimeSpan operators, as well as operator overloading.
The following table lists the arithmetic operators provided by Visual Basic.
OPERATOR  PURPOSE  EXAMPLE  RESULT 

 Exponentiation 
 (2 to the power 3) = 
 Negation 


 Multiplication 


 Division 


 Integer division 


 Modulus 


 Addition 


 Subtraction 


 Bit left shift 


 Bit right shift 


The bit shift operators deserve a little extra discussion. These operators shift the binary representation of a number by a given number of bits either left or right. Unfortunately, Visual Basic doesn't understand binary so you must manually translate between binary and decimal, octal, or hexadecimal.
For example, the hexadecimal value &H57 is 01010111 in binary. If you shift this one bit to the left, you get 10101110, which is &HAE in hexadecimal. If you shift the original value one bit to the right, you get 00101011, which is &H2B in hexadecimal.
When working with binary values, many developers prefer to work in hexadecimal because each hexadecimal digit corresponds to four binary bits so you can work with each group of four bits separately.
Visual Basic provides two concatenation ...
No credit card required