Molarity (M) = Moles of solute (n) / Volume of solution (V)
Rearranging the formula to solve for moles of solute (n):
n = M x V
Substituting the given values into the formula:
n = 2.0 M x 2 L = 4 moles
Therefore, 4 moles of NaOH are needed to prepare 2 liters of a 2.0 M solution.