procedure  CROSSOVER   The crossover of chromosome A and B
  Input:           Chromosomes before crossover
  Output:           Chromosomes after crossover
  while     do        for the entire size of chromosome
   if   then check the bit positions of chromosomes
                store the values in a list
   else
    
   end if
  end while
       Select a random bit position from list
  for   do
       Copy partial values of parent(A) to child(a)
       Copy partial values of parent(B) to child(b)
  end for
  for    do
        Copy remaining values of parent(B) to child(a)
        Copy remaining values of parent(A) to child(b)
  end for
  return              Chromosome after crossover
 end procedure
Algorithm 2: Modified Crossover.