I can’t understand what is happening and how it comes from the following lines:
Example 1: I get 1 as the result for below.
int a = 1, b = 9; int r = a & b; Console.WriteLine(r);
Example 2: I get 8 as the result for below.
int a = 10, b = 9; int r = a & b; Console.WriteLine(r);
I do not know the meaning of & and the meaning of & in this context. How are the results processed above? What is the logic?
source share