To convert from atomic weight to grams, multiply by 1.6605402e-24. For instance, the atomic weight of the most common isotope of Oxygen is 15.9994. In grams, that would be 15.9994 * 1.6605402e-24 = 2.656764688e-23 g.
You convert grams into atomic mass units by measureing the size of the gram and multiplying the size by the mass of E=mc2. Then you subtract pi from syrup. sometimes this method doesn't work on even...
Tricky bit that, but it's part of the definition of the molar mass. Basically, if you were to collect 6.022×1023 atoms of a substance of a particular atomic mass (lets say 6 for arguments sake),...