The all 0s address was used by older routing protocols to distinguish a subnet route from a 32-bit host route. The all 1s address was used to broadcast to all hosts on the subnet. Since newer routing protocols are fully capable of handling routing prefixes of any length, and anything that can be done with broadcast can be done better with multicast, both of these reserved addresses belong in the arcana of Internet history books. Unfortunately, some TCP/IP implementations still use these reserved addresses, and many more implementations maintain backwards compatibility, so it's best to err on the safe side and not assign these two addresses.
A 32-bit prefix would be useless as a subnet prefix, since it only matches a single address, and what use is a cable with only one connection? A 31-bit prefix matches two address, but both of them would be reserved, so 31-bit prefixes aren't used either. A 30-bit prefix, matching four address, two of which can be assigned, is the longest usable subnet prefix. Of course, a 30-bit subnet can only have two hosts, so these prefixes are popular for use with serial links. Likewise, a 29-bit prefix matches eight addresses, of which six can be assigned. The most important prefix lengths, along with the number of assignable addresses, are shown in the table.
|Prefix Length||Matching Addresses||Assignable Addresses|
The table could be extended to /15 and beyond, but there is very little use for a single subnet with even a /16 prefix - it's simply too large. Putting 65,000 devices on a single Ethernet (or other technology) just isn't practical.