Question
Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?
Official answer and solution
- Official answer
- A
- From
- Official GATE 2024 answer key
Solution
Compare the binary representations of the third and fourth octets of 10.12.2.0 and 10.12.3.255.
Writing the last two octets in binary:
10.12.2.010.12.3.255
The first bits (10.12.0000001_) are identical across the entire range, while the remaining bits vary through all combinations from all 0s to all 1s. Thus the exact CIDR prefix is 10.12.2.0/23.
Option (A)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2024 Computer Science and Information Technology - Set 2 (CS2)
- Question
- 38 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.