GATE | GATE CS 2019 | Question 37
Consider three machines M, N and P with IP addresses 100.10.5.2, 100.10.5.5 and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true?
(A) M, N and P all belong to the same subnet
(B) Only N and P belong to the same subnet
(C) M, N, and P belong to three different subnets
(D) Only M and N belong to the same subnet
Answer: (B)
Explanation: First, we will do bitwise AND between Subnet mask and given IP address one by one
For M: 100.10.5.2
Bitwise AND:
01100100.00001010.00000101.00000010 (100.10.5.2) AND 11111111.11111111.11111111.11111100 (255.255.255.252) ___________________________________________________________ = 01100100.00001010.00000101.00000000 (100.10.5.0)
For N: 100.10.5.5
Bitwise AND:
01100100.00001010.00000101.00000101 (100.10.5.5) AND 11111111.11111111.11111111.11111100 (255.255.255.252) ___________________________________________________________ = 01100100.00001010.00000101.00000100 (100.10.5.4)
For P: 100.10.5.2
Bitwise AND:
01100100.00001010.00000101.00000110 (100.10.5.6) AND 11111111.11111111.11111111.11111100 (255.255.255.252) ___________________________________________________________ = 01100100.00001010.00000101.00000100 (100.10.5.4)
It is sure from the above computation that N and P belong to the same network (i.e., 100.10.5.4), while M can belong to the same network or it can be from any other network.
So, option (B) is correct.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 1999 | Question 36
- GATE | GATE CS Mock 2018 | Question 39
- Top 5 Topics for Each Section of GATE CS Syllabus
- How to prepare in Last 10 days to score high in GATE?
- Aptitude | GATE IT 2006 | Question 7
- Aptitude | GATE IT 2006 | Question 8
- GATE | GATE CS 2013 | Question 1
- GATE | GATE CS 2013 | Question 3
- GATE | GATE CS 2013 | Question 4
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 6
- GATE | GATE CS 2013 | Question 7
- GATE | GATE CS 2013 | Question 8
- GATE | GATE CS 2013 | Question 65
- GATE | GATE CS 2013 | Question 65



