This is due to lenition (soft mutation), which turns not only d into dd but also p t c b m into b d g f f and causes initial g to disappear entirely.
There are several situations that cause lenition. I think these are some of them:
- When a noun comes directly after verb + personal pronoun. I think "Dw i ddim" can be understood as coming from this rule as the "dim" is after "dw i".
- When a noun or adjective comes after yn. So I think it's "Dw i'n fach" (I am small) or "Dw i'n ddraig" (but: Draig dw i).
- A feminine singular noun after the definite article (y ferch "the girl", Mae'r ferch ... "the girl (is)...")
- An adjective following a feminine singular noun (merch fach "a small girl")
I am still grasping that logic. It seems that there is not Yes or No but the negative or affirmative of the verb. EG. Are you going? Answer Going/Not going. As stated still struggling with the logic. Before I thought there were a hundred ways to say yes or no and could not understand why yes and no were the same as the verb. Will return to Celtic languages linguistics text which is almost as hard to read in English as learning Welsh