As your sentences have been corrected, I'll just give a quick overview on forming verbal adverbs.

Imperfective:
1. Take 3rd person plural present tense.
2. Drop last two letters.
3. Add я (if the last letter is a sibilant (ш, щ, ж, ч) add a instead).

читать (Infinitive)
чита (Drop last two letters (from читают) = ть))
читая (Add я)

Perfective:
1. Masculine past tense
2. Drop л
3. Add в
Написать (Infinitive)
Написал (Masculine past tense)
Написа (Drop л)
Написав (Add в)

Examples:

Уходя, он попрощался с нами.
Leaving (in the context 'as he was leaving'), he said goodbye to us.

You could just as easily say:
Когда он уходил, он попрощался с нами.

Прочитав газету, он передал её мне.
Having read the newspaper, he gave it to me.

You could say more simply:
Когда он прочитал газету, он передал её мне.

------------------

Remember that these rules, as it goes with Russian, are not 100%, there will always be exceptions.