Molarity is defined as the number of moles of solute dissolved in volume of 1 L.
the number of moles of NaCl dissolved in 500 mL solution is 0.50 mol
we need to know the number of NaCl moles in 1000 mL.
Therefore if 500 mL contains 0.50 mol
then 1 L contains - 0.50 mol / 0.5 L= 1 mol/L
molarity of NaCl is 1.0 M