Gradual Learning
More quizzes

Subnetting from zero · Step 3 of 4

AND the address with the mask

Last step you saw the mask split network from host. Now here's the one mechanical move that actually uses it: AND the address against the mask to find the network.

3 quick questions · about 2 min · no sign-up

Question 1 of 3

You line an address up directly above its mask, bit by bit. For each column, what does the bitwise AND keep?

You said: Keep the address bit only where the mask bit is 1; force it to 0 where the mask is 0

Exactly

Exactly. AND of two bits is 1 only when both are 1. Under a mask 1, the address bit passes through unchanged; under a mask 0, the result is forced to 0. So the network bits survive and the host bits get zeroed.

You said: Keep the address bit wherever the mask bit is 0

Not quite

That's backwards. AND keeps a bit only when BOTH are 1, so the address survives under mask 1s, not mask 0s. Under a mask 0 the result is always 0. The 1s mark the network part you keep; the 0s zero out the host part.

You said: Flip every address bit that sits under a 0

Close

Close on the location, but AND doesn't flip — it forces to 0. A bit under a mask 0 becomes 0 regardless of what it was. Bits under mask 1 pass through unchanged. So you keep network bits and zero out host bits.

You said: I'm not sure

No worries

No problem. The rule: AND of two bits is 1 only when both are 1. So under a mask 1 the address bit passes through unchanged, and under a mask 0 it's forced to 0. Network bits survive, host bits go to zero.

Another way to see it

Think of the mask as a stencil laid over the address. Holes (the 1s) let the address bits show through; solid parts (the 0s) paint over them with 0. What shows through is the network address.

That rule is the whole engine. Let's run it on a clean case first.

Question 2 of 3

Address 192.168.1.130 with mask 255.255.255.0 (/24). The first three octets match the mask's 255s, so focus on the last octet: 130 AND 0. What's the network address?

You said: 192.168.1.0

Exactly

Right. The last mask octet is 0 (all zero bits), so every bit of 130 gets forced to 0 — the last octet becomes 0. The first three octets sit under 255s, so they pass through unchanged. Network: 192.168.1.0.

You said: 192.168.1.130

Not quite

That keeps the host bits. The last mask octet is 0, so AND forces all 8 bits of 130 down to 0 — the last octet is 0, not 130. The 130 was the host part, and the mask zeroes it out. Network: 192.168.1.0.

You said: 192.168.1.255

Close

That's the broadcast address, not the network. AND with a 0 octet forces the last octet to 0, not 255 — 255 is what you'd get filling the host bits with 1s. The network is the all-zeros host end: 192.168.1.0.

You said: I'm not sure

No worries

The answer is 192.168.1.0. The last mask octet is 0, so AND forces all of 130's bits to 0. The first three octets pass through under the 255s. Network: 192.168.1.0.

Easy when the mask octet is all 0s or all 255s. The real test is a mask that splits an octet down the middle.

Question 3 of 3

Now a /26: address 192.168.1.130, mask 255.255.255.192. That last mask octet 192 is 11000000 — keep the top 2 bits, zero the rest. With 130 = 10000010, what's the network address?

You said: 192.168.1.128

Exactly

Exactly. 130 is 10000010; AND with 11000000 keeps only the top two bits → 10000000 = 128. The lower six host bits are forced to 0. Network: 192.168.1.128.

You said: 192.168.1.130

Not quite

That keeps host bits the mask zeroes out. 130 = 10000010; under 11000000 only the top two bits survive → 10000000 = 128. The trailing 10 (the 2 in 130) sits under mask 0s and gets forced to 0. Network: 192.168.1.128.

You said: 192.168.1.192

Close

You used the mask value as the answer instead of ANDing it with the address. AND 130 (10000010) with 192 (11000000) keeps the top two address bits → 10000000 = 128, not 192. Network: 192.168.1.128.

You said: I'm not sure

No worries

It's 192.168.1.128. Write 130 as 10000010 and AND it with 192 = 11000000: keep the top two bits, zero the other six → 10000000 = 128. Network: 192.168.1.128.

The takeaway

To find the network address, AND the address with the mask: every bit under a 1 passes through, every bit under a 0 becomes 0. That single move turns "address plus mask" into "which network it belongs to" — even when the mask splits an octet, like 130 AND 192 = 128.

Next step

You can AND an address and mask to find the network address. The leftover 0s in the mask are the host bits — and counting what fits in them is the last piece.

The real tutor would keep building this with you, step by step, and remember where you are.

Or make it about your topic:

No shame in this

Still fuzzy after two angles? That's the exact moment the real tutor is built for — it works out which step is tripping you, re-explains from a direction that fits how you think, and checks you've actually got it before moving on. This preview can't adapt to you. The tutor does.