Question
If an IP network uses a subnet mask of 255.255.240.0, the maximum number of IP addresses that can be assigned to network interfaces is __________. (answer in integer)
Official answer and solution
- Official answer
- 4094
- From
- Official GATE 2026 answer key
Solution
Count the number of host bits (0s) in the 32-bit subnet mask 255.255.240.0 and compute .
Writing the subnet mask 255.255.240.0 in binary:
- First two octets: ones.
- Third octet: , which has ones and zeros.
- Fourth octet: , which has zeros.
Thus, there are host bits. Excluding the network address (all host bits ) and the directed broadcast address (all host bits ), the maximum number of assignable host IP addresses is:
4094
Forgetting to subtract 2 for the network and broadcast addresses.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2026 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 33 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.