calculates cidr notation for submask