I am currently trying to solve this question:
What mask would you use so that 172.27.0.0 can have 10 subnets with 3110 hosts each?
How can one reason about these type of questions?
My attempt: 172.27.0.0 implies 16 bits are already used for the network address?
To have 10 subnets, one would require ceil(log2(10)) = 4 bits.
To have 3110 hosts, one would require ceil(log2(3110)) = 12 bits, since 2**12 = 4096 > 3110 + 2.
Final answer: 172.27.0.0/20