Suppose computers $A$ and $B$ have $IP$ addresses $10.105.1.113$ and $10.105.1.91$ respectively and they both use same netmask $N$. Which of the values of $N$ given below should not be used if $A$ and $B$ should belong to the same network?
D is correct answer because:
When we perform $AND$ operation between $IP$ address $10.105.1.113$ and $255.255.255.224$ result is $10.105.1.96$
When we perform $AND$ operation between $IP$ address $10.105.1.91$ and $255.255.255.224$ result is $10.105.1.64$
$10.105.1.96$ and $10.105.1.64$ are different network so $D$ is correct answer.
The last octets of IP addresses of A and B
A:113 (01110001) and
B: 91 (01011011).
The netmask in option (D) has first three bits are 111 in last octet. If netmask has first 3 bits set, then these bits must be same in A and B, but that is not the case. we can say option (D) is not a valid netmask because doing binary ‘&’ of it with addresses of A and B doesn’t give the same network address. It must be same address as A and B are on same network.