GateAI
CIDR Notation

GATE CSE 2024 Set 2 · Q38

MCQ2 marksEasy

Time

Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) 10.12.2.0/23

CIDR Notation

We are given the IP address range:

  • Start IP: 10.12.2.0

  • End IP: 10.12.3.255

  1. Total number of addresses: The range covers two /24 subnets (10.12.2.0/24 and 10.12.3.0/24), which gives:

    N=256+256=512=29 addressesN = 256 + 256 = 512 = 2^9 \text{ addresses}
  2. Host bits and Prefix length: Since 2h=5122^h = 512, the number of host bits is h=9h = 9. The prefix length is:

    Prefix Length=32−9=23\text{Prefix Length} = 32 - 9 = 23
  3. Network Prefix Alignment: Converting the third octet to binary:

    • 2=0000001022 = 00000010_2

    • 3=0000001123 = 00000011_2

    For a /23/23 prefix, the first 7 bits of the 3rd octet are fixed as network bits (000000120000001_2), and the last bit is a host bit. Thus, the base network address is:

    10.12.2.0/2310.12.2.0/23

Hence, the correct prefix is 10.12.2.0/23, which corresponds to option (A).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This CIDR Notation previous year question is Q38 of the GATE CSE 2024 Set 2 paper. Find more GATE CSE PYQs on CIDR Notation in Computer Networks, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related CIDR Notation PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

CIDR Notation in GATE CSE

CIDR Notation has 7 GATE CSE PYQs across 7 papers from 2022 to 2026. 2 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2024 Set 2.

How GATE tests CIDR Notation

More from GATE CSE 2024 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 2 · Q38 · MCQ

Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.