Course overviewTopic 10 / 31
Computer Networks • Deep Lesson 15 min Network Layer: IP & Routing

IPv4 Anatomy: Network Bits, Host Bits & CIDR

An IPv4 address is 32 bits. A CIDR prefix such as /24 says that the first 24 bits identify the network prefix while the remaining 8 bits are available for host addressing within that subnet. Subnetting is the art of allocating those bits deliberately rather than treating addresses as four unrelated decimal octets.

LEARNING LOOPWatch→Read→Inspect→Retrieve→Teach back
IPv4 Anatomy: Network Bits, Host Bits & CIDR
Week 2–3 · Topic 10 / 31
Subnet playground
Mask
255.255.255.224
Network
192.168.10.32
Broadcast
192.168.10.63
Conventional usable
30
32 total addresses • 5 host bits • /27 prefix
Article companion· Week 2–3

An IPv4 address is 32 bits. A CIDR prefix such as /24 says that the first 24 bits identify the network prefix while the remaining 8 bits are available for host addressing within that subnet. Subnetting is the art of allocating those bits deliberately rather than treating addresses as four unrelated decimal octets.

01

Binary is the truth

The decimal form is a human-friendly encoding of 32 binary bits. Subnet masks simply mark which positions belong to the network prefix.

02

CIDR is variable length

Old classful thinking used fixed A/B/C boundaries. CIDR lets operators choose prefixes such as /20, /27 or /31 to fit actual capacity.

03

Network, broadcast and usable hosts

For a conventional IPv4 subnet, the all-zero host address is the network address and the all-one host address is the broadcast address, leaving 2^h − 2 conventional host addresses when h ≥ 2. Point-to-point and special-purpose prefixes have exceptions.

DUAL CODING

See the mechanism before you memorize it

One diagram, one causal story, one reconstruction task.

VISUAL RECONSTRUCTION

IPv4 anatomy: network vs host bits, CIDR — causal map

4 stages
01

1

Write the address in 32-bit binary.

02

2

Mark the first N bits as the network prefix for /N.

03

3

The remaining bits identify hosts inside that prefix.

04

4

Compute the network boundary and next subnet boundary.

Trace the mechanism from left to right. On smaller screens, follow the numbered sequence. Then redraw the same flow without looking.
ACTIVE RECONSTRUCTION

Draw the idea yourself

Rebuild the core flow on a real canvas before moving to the worked walkthrough.

SKETCHFLOW

IPv4 anatomy: network vs host bits, CIDR — practice canvas

Sketch the IPv4 anatomy: network vs host bits, CIDR mechanism from memory. Label the input, transformation, observation, and transfer.

Practice canvas ready

The canvas loads when you reach this section.

Draw first. Compare second.Touch + mouse friendly
STEP BY STEP

Walk the system

01

1

Write the address in 32-bit binary.

02

2

Mark the first N bits as the network prefix for /N.

03

3

The remaining bits identify hosts inside that prefix.

04

4

Compute the network boundary and next subnet boundary.

05

5

Check whether the requested host lies inside the subnet.

CONCRETE ARTIFACT

Example

A /27 leaves 5 host bits, giving 32 addresses per block. For conventional host addressing, .32 is the network and .63 is the broadcast address.

textcopy → rebuild → modify
192.168.10.37/27
mask = 255.255.255.224
block size = 32
subnet = 192.168.10.32/27
range = .32–.63
MISCONCEPTIONS

What usually goes wrong

Count octets instead of bits when solving CIDR problems.

Use 256−prefix as the host count for arbitrary masks.

Assume every subnet always gives two addresses that can be assigned to endpoints; special prefixes differ.

RETRIEVAL PRACTICE

Close the tab. Rebuild it from memory.

Read the question, answer aloud, then reveal.

How many host bits does /27 leave?Reveal answer

5 host bits because 32 − 27 = 5.

What determines the subnet size?Reveal answer

The prefix length. Fewer network bits means more addresses per subnet; more network bits means smaller subnets.

Why learn binary subnetting?Reveal answer

It reveals the actual bit boundary and prevents memorized decimal tricks from failing on unusual prefixes.

FEYNMAN

Teach it back in plain English

Convert 10.20.30.65/26 into binary, identify the 26-bit boundary, and explain why the answer is a block boundary rather than a guessed range.

EXAM / INTERVIEW

What a strong answer sounds like

Expect host-count, network-address, broadcast-address, subnet-range and prefix-comparison questions.

NEXT CONNECTION

Make this idea travel.

Connect it next to: subnetting • routing • subnet-design-lab.

COURSE CONTENTS

IPv4 anatomy: network vs host bits, CIDR

01How the Internet Works + OSI ModelWeek 1 · 4 topics0/4
02Physical & Data Link LayersWeek 1–2 · 5 topics0/5
03Network Layer: IP & RoutingWeek 2–3 · 6 topics0/6
04Transport Layer: TCP & UDPWeek 3–4 · 5 topics0/5
05Application Layer: HTTP, DNS & FriendsWeek 4–5 · 6 topics0/6
06Security & Troubleshooting ToolkitWeek 5 · 5 topics0/5