Hello,
In the section of Bit manipulation left shiift is used extensively. My simple question is that there it is interpreted for two different tasks mentioned below
-
i = 4
int mask = i << 4;
// Binary output: 1000 -
i=4
int mask = i << 4;
// Binary output: 1111
How the same operation can give two different output. Can you please give the difference between both.