Advanced Math/Kilos to grams
All SOLARMath equations work with Kilograms ( http://members.shaw.ca/warmbeach/INDEX3.htm
I don't want you to agree with SOLARMath, but please could you just tell me if multiplying this final value by 1,000 is correct.
Mass of earth in Kilograms = 5537831004648121688015772.9772114697
Mass of earth in grams = 5537831004648121688015772977.2114697
Note: All SOLARMath equations are Kilograms. Hence, because Avogadro's number is atoms / mole which leads to atoms / gram, the initial Mass of the earth must begin with grams.
The Mass of the earth divided by Gravity^4 x Acceleration of earth in orbit = Avogadro's number.
5537831004648121688015772977.2114697 / (9.8)^4 = 600392689687827221617859.5082045622325038
600392689687827221617859.5082045622325038 x .001003207246557 = 602318297074676474879.204
That final value must be multiplied by 1,000 due to the initial conversion of kilograms to grams, thus giving Avogadro's complete number; 602 318 297 074 676 474 879 204.
Kilograms (kg) to grams (g) is an easy conversion. We have by definition, 1 kg = 1000 g = 10^3 g.
Using scientific notation on the number you provided, the mass of the earth in kilograms is
5537831004648121688015772.9772114697 ≈ 5.537x10^24 kg.
Converting this to gram just mean multiplying by 1000 which is equivalent to adding 3 to the exponent of 10, so that
Mass of earth in grams ≈ 5.537x10^27 g.
This conversion is equivalent to moving the decimal point over 3 positions, so it looks like your first expression is correct.
5537831004648121688015772.9772114697 kg = 5537831004648121688015772977.2114697 g.
The Avogodro's Number calculation also looks correct since the mass of the earth comes in as a proportionality constant (it doesn't come in as squared or 1/mass or any other more complicated way). This means you can just multiply by 1000 in the final answer to go from kg to g, as you say.