The pattern of bits in the mask determines which bits will be passed from the source address to the destination…