Every IPv4 is a 32 bit representation.
Below is the case for CLASSFUL IP ADDRESSES
In Class-C first 24 bits are used for NetworkID part and last 8 bits are used to identify host id.
So we think 2^ 24 networks possible but it is not correct because in class-C first three bits are always 110.
so remaning bits for NID part is 24-3=21
so with 21 bits we can form 2^21 different networks.
Just like this in Class-A first bit is always (0) Therefore number of networks in class-A is 2^7
Just like this in Class-B first two bits are always (10) Therefore number of networks in class-A is 2^14