Nuclear magnetic resonance spectrometry (NMR) involves observing local magnetic fields around atomic nuclei. 1H NMR determines the type and number of hydrogen atoms, and 13C NMR determines carbon atoms in a molecule. NMR works based on atomic nuclei spins in a magnetic field, with protons in different environments absorbing at slightly different frequencies. Modern NMR spectrometers use a constant magnetic field and varying radio frequencies to achieve resonance of nuclei such as 1H, 13C, 19F and 31P, which give rise to NMR signals.