CSharp - Operator Bitwise operators

Introduction

C# supports the following bitwise operators:

Operator MeaningSample expression
~ Complement ~0xfU
& And0xf0 & 0x33
|Or 0xf0 | 0x33
^ Exclusive Or 0xff10 ^ 0x0ff0
<<Shift left 0x30 << 2
>>Shift right 0x30 >> 1