A more visual way to see this is through the binding-energy-per-nucleon curve, the graph of \( E_b / A \) plotted against mass number \( A \) for all known nuclei.
This curve rises steeply for light nuclei, peaks around \( A \approx 56 \) near iron, and then falls off slowly for heavier nuclei. Nucleons in a nucleus near the peak are the most tightly bound of all, in the sense of having the highest binding energy per nucleon.
Why the mass changes while nucleon count doesn't:
The mass of any nucleus equals the sum of the masses of its free, separated nucleons minus \( E_b / c^2 \) for that nucleus. A nucleus with a higher position on the binding-energy-per-nucleon curve has converted more of its constituent mass into binding energy, so it weighs less per nucleon than one lower on the curve, purely because of how tightly it is bound, not because it contains different nucleons.
Fission (heavy nuclei):
A heavy nucleus, sitting on the falling right-hand side of the curve, splits into two medium-mass nuclei that sit closer to the peak, at a higher binding energy per nucleon. Since the same total number of nucleons is now more tightly bound than before, some of the original mass has converted into the released energy of fission.
Fusion (light nuclei):
Light nuclei, sitting on the steeply rising left-hand side of the curve, combine into a single heavier nucleus closer to the peak, again moving to a higher binding energy per nucleon. The nucleons involved are the same before and after, but the resulting nucleus is more tightly bound, and the corresponding mass difference is released as energy, this is what powers the Sun and other stars.
In both cases, protons and neutrons are simply rearranged into a configuration with different binding energy; it is this change in binding energy, not any change in the number of nucleons, that shows up as the mass converted to or from energy.
A beam of light of wavelength \(\lambda\) falls on a metal having work function \(\phi\) placed in a magnetic field \(B\). The most energetic electrons, perpendicular to the field, are bent in circular arcs of radius \(R\). If the experiment is performed for different values of \(\lambda\), then the \(B^2 \, \text{vs} \, \frac{1}{\lambda}\) graph will look like (keeping all other quantities constant).