I have lately taking interest in networking so I picked up a book to get acquainted with networking principles. The book I have chosen is that of Glen E. Clarke "CompTIA Network+ ...." which is supposed to be a preparation book for the Network+ certification. On the subnetting chapter of it, as an example, we wanted to divide the following (Class A)address: 10.0.0.0 into 2 subnetworks.
On this example, he used the following formula: (2^number_of_masked_bits) - 2 = number of networks.
using this he created this table with the note above it.
On this exact same book but on a different edition, where he (this time) tried to divide the network into FOUR sub-networks, he used the following formula: (2^masked_bits) = number of networks. And he took the table as is and never declared any address to be illegal !!!:
Can you please explain to me how does this work ? thank you