The molar mass of NaOH is 40g, so 0.5mol is 20g
The molar mass of Na is 23g, O is 16g and H is 1g (total 40g), so in this case we have
Na 11.5g, O 8g and H 0.5g (total 20g)
The mole is represented by Avogadro's number, which is 6.022 × 1023 atoms or molecules per mol.