The 1-1-1 Rule: Words of one syllable (hop), having one vowel followed by one consonant, need another final consonant (hop + ped) before adding endings that begin with a vowel. This rule does not apply to words with x since x has two sounds /ks/.
The 2-1-1 Rule:
Words of two syllables (be gin) in which the second syllable (gin) is accented and has one vowel followed by one consonant, need another final consonant (be gin + ning) before adding an ending that begins with a vowel. If the last syllable is not accented (en ter, prof it, bud get) do not double the final consonant before adding the ending.