The 32-bit value whose contiguous leading ones identify the network portion of an IPv4 address and whose remaining zero…