B Bitwise and Shift Operators
We typically use base 10 integers in our program, which are represented internally as binary numbers. C# int values always use 32 bits. Thus C# represents the number 25 internally as
0000 0000 0000 0000 0000 0000 0001 1001
C# has several bitwise operators that operate on each bit of an int value.
Figure B.1 shows the effects of these operations on corresponding bits of each operand.
FIGURE B.1 The effect of bitwise operators
To illustrate these operators we use 4-bit values for simplicity, rather ...