These are the bitwise operators in VB.NET : And, Or, Xor, Not
Example of And bitwise operation
Dim a as Integer
a = 3 And 5
The value of a will be 1. The result is obtained after comparing 3 and 5 in binary for. 3 in binary form is 011 and 5 in binary form is 101. The And operator places 1 if both bits are 1. If any of the bits are 0 then the value will be 0
3 And 5 will be 011
101
---
001
So the binary result is 001 and when that is converted to decimal, the answer will be 1.
Or operator places 1 if both or one bit is 1
3 Or 5 will be 011
101
---
111
Xor operator places 1 if only one of the bit is 1 (not both)
3 Xor 5 will be 011
101
---
110
Not operator reverts the bits including sign
Not 5 will be - 010