Is this a valid question (related to subnetting)

in CCNA & CCENT
This is from my Sybex book. The objective was to find the mask.
1. 192.168.100.17, with 4 bits of subnetting
Since it was a class C, I said 255.255.255.240 as the mask.
Now I know that is right. But what if the numbers were:
172.16.0.1 with 4 bits of subnetting
Would the mask change to 255.255.240.0 ?
10.0.0.1 with 4 bits of subnetting. What would the mask be then?
255.240.0.0?
Help, am I doing this wrong?
1. 192.168.100.17, with 4 bits of subnetting
Since it was a class C, I said 255.255.255.240 as the mask.
Now I know that is right. But what if the numbers were:
172.16.0.1 with 4 bits of subnetting
Would the mask change to 255.255.240.0 ?
10.0.0.1 with 4 bits of subnetting. What would the mask be then?
255.240.0.0?
Help, am I doing this wrong?
Comments
255.255.0.0
172.16.0.1 with 4 bits of subnetting ..mask would indeed be 255.255.240.0
Since 172.16.0.1 is a class B address it has 16 bits of network...and as 4 bits are going towards subnet it leaves 12 bits for the host so the mask should have 12 zeros or /20 as the mask or 255.255.240.0
10.0.0.1 with 4 bits of subnetting will have 255.240.0.0 as the mask.
Since 10.0.0.1 is a class A address it has 8 bits of network...and as 4 bits are going towards subnet it leaves 20 bits for the host so the mask should have 20 zeros or /12 as the mask or 255.240.0.0
hope it helps.
If you say 4 bits, then that's 4 bits. period.
The only difference with the various classes is that 4 subnet bits would mean the same number of subnets (with the same subnet ID's) but a greater number of hosts .
2lbs.
Magnanimous as the ocean, persistent as time.