# How to find the number of hydrogen atoms in 0.5 mol of hydrogen gas?

How do I calculate the number of hydrogen atoms in $$\pu{0.5 mol}$$ of hydrogen gas? I presume the answer would probably somehow use the equation $$n = \frac{m}{M},$$ where $$n$$ is the amount of substance, $$m$$ is the mass, and $$M$$ is the molar mass. However, I'm not sure how to calculate it.

There is no need to use $$n = \frac{m}{M},$$ since you already have been given the amount of substance. You would need to use the equation, if you were given the mass $$m$$, e.g. as $$\pu{0.5 mg}$$.
If you want to calculate the number of hydrogen atoms in $$\pu{0.5 mol}$$ hydrogen gas, then you should consider that they are diatomic molecules, $$\ce{H2}$$. The unit mole is represented by the Avogadro constant and is $$N_\mathrm{A} = \pu{6.02214076×10^23 mol−1} \approx \pu{6.022×10^23 mol−1}$$ Each hydrogen molecule has two hydrogen atoms, therefore \begin{align} n(\ce{H}) &= 2 \cdot n(\ce{H2}),\\ N(\ce{H}) &= n(\ce{H}) \cdot N_\mathrm{A},\\ N(\ce{H}) &= 2 \cdot n(\ce{H2}) \cdot N_\mathrm{A},\\ N(\ce{H}) &= 2 \times \pu{0.5 mol} \times \pu{6.022×10^23 mol−1},\\ N(\ce{H}) &= \pu{6.022×10^23}. \end{align}