The mass of a proton and a neutron is not exactly 1 atomic mass unit (amu). The commonly used value for the mass of a proton is approximately 1.0073 amu, while the mass of a neutron is approximately 1.0087 amu. These values take into account the masses of quarks and the binding energy within the nucleons.
On the other hand, the atomic mass unit (amu) is defined based on the carbon-12 isotope. One atomic mass unit is defined as 1/12th the mass of a carbon-12 atom, which is approximately 1.66054 x 10^(-27) kilograms.
Regarding the atomic mass, it includes the masses of protons, neutrons, and electrons in an atom. However, the mass of electrons is much smaller compared to protons and neutrons. Since electrons have a mass of approximately 9.1 x 10^(-31) kilograms (or about 0.0005486 amu), their contribution to the atomic mass is negligible in most cases. Therefore, when considering the atomic mass of an atom, the focus is primarily on the total number of protons and neutrons in the nucleus.