Compare whole IPv4 octets IPv4 has 32 bits in four octets. An octet is eight bits written as one dotted decimal number from 0 through 255. A /24 fixes 24 leading bits, exactly the first three octets. Compare complete numbers: 5 is not 50. A subnet mask marks fixed bits with 1 and variable bits with 0. For /24 this is 255.255.255.0. Eight bits remain free. Each bit has two possible values, giving 2 to the power 8 = 256 total addresses. That total includes network and broadcast positions; it is not an ordinary usable-host count. Other prefixes need their own membership rules. Prefix cards. Original fictional addresses. Not your computer's addresses. Worked prefix 192.168.40.0/24 The prefix length is 24 bits. In this octet-aligned example the first three octets stay 192.168.40. 192.168.40.10 is inside. 192.168.41.10 is outside because the third octet differs. The mask with those same 24 one-bits is 255.255.255.0. Eight bits remain, so the prefix covers 256 addresses. This counts the whole block rather than only assignable ordinary-host addresses. Activity prefix 10.8.0.0/24 10.8.0.15 compare the first three octets 10.8.1.15 compare the first three octets 10.9.0.15 compare the first three octets Predict before reading the check. Check: 10.8.0.15 is inside. The other two are outside. A /31 or a /32 does not use this lesson's three-octet habit. Stay with the stated /24.