I believe I understand where you are coming from with your original question. The mass number of carbon-12 is 12, which as you say is the sum of the protons and neutrons. Note that this is an integer value - mass number is the sum of protons and neutrons in a specific nucleus, and since no nuclei contain fractions of protons or neutrons, the mass number can never be a decimal or fraction. The atomic mass of carbon-12 is 12.000, not because it is the sum of protons and neutrons, but because that was how the atomic mass unit was defined. (Note that no other nucleus has an atomic mass with a decimal value of zero to infinite precision - deuterium (hydrogen-2) is not 2.000, but is 2.01410178 )
If you look up the mass of a proton, it is actually 1.007276466812 atomic mass units, and a neutron is very slightly heavier at 1.00866491600 atomic mass units. So anybody with basic mass skills would expect that a carbon-12 nucleus should weigh 12.0956 atomic mass units. But the mass of a nucleus is not the sum of the masses of protons and neutrons - on those scales, energy and mass are interchangeable, and the true weight of a carbon-12 nucleus is slightly less, the remainder being energy. You will need to talk to somebody with a much deeper knowledge of particle physics and nuclear structure to get the full details. The bottom line is that the mass of an atom is not just the sum of protons and neutrons, and when the atomic mass scale was being defined, it was defined experimentally. 1 mole of atoms of carbon-12 was defined to be exactly 12 grams, and that number has been used to determine all of the other atomic weights as well as how many atoms make up a mole. (The actual definition of a mole is not 6.022x1023 molecules, but is "the number of elemental entities there are atoms in 12 grams of carbon 12", which was eventually calculated to be 6.022x1023.) All of the other atomic scale mass numbers have been backcalculated from that definition.