0000 0000 0000 1000 -> this is the binary of 8.
where k = 3;
n = n>>k&1;
n>>k --> here i am right shifting "3rd" position to "0th" position.
after that n binary will be 0000 0000 0000 0001
then i am doing "&" operation with "1"
0000 0000 0000 0001 & 0000 0000 0000 0001
here 1 & 1 = 1;
giving output as 1;