The General rule
The basic rule of writing the particle "not" with gerunds is that the particle should be written separately. It is easy to remember by analogy with verbs: once "not" with verbs it is written separately, and "not" with gerunds formed from these verbs, is also written separately. For example: not listening, not creating, not being able to. During the lesson he did his own thing, not listening to the teacher.
"Not" with the gerund written together only in one case: if no "no" word is not used. For example: hating, newslabel, angry. Newslabel daughter-in-law, Tatiana complained about her son. "Not" in this case can not be removed, is part of the word.
Another slight complication is that the particle "not" is easily confused with the prefix "under". The prefix is part of the word and is written together: nedodelal, underestimating, lack of sleep. He left work, nedodelal report. In this case, the root word is "del", and "under" is a prefix inseparable from the root.
Complexity and difficult cases
The main difficulty of writing "not" with the gerund is in the use of homonymous forms. That is, the same sounding words in the Russian language may have different lexical meaning, and, accordingly, different spelling.
For example, the words "famished" and "not eating" have a different meaning and therefore are written in different ways. Mom goes to work, not eating Breakfast. Here the word is used to mean "can't eat the whole thing." In this case "not" is written separately. During the war people lived, starved for months. Here the meaning is different – "I have not eaten to the end." This option is written together.
Also often made errors due to indistinguishable to the ear from each other gerunds and derived prepositions. For example: "despite" and "despite". Not looking at the sky, he moved on. In this case, we use the gerund, which is written separately from "no". Despite the temperature, she went to school. Here "although" is derived the preposition and it is written together.
To easily distinguish a gerund from a preposition, you need to ask a question to the needed word. So the gerund will approach the question: "What doing?" or "What doing?" He moved on, doing what? Not looking at the sky. To the second sentence questions gerunds are not suitable.
Also, the gerund is easy to determine because it can be replaced with no distortion of meaning in the sentence. He moved on and did not look at the sky. The second example in the same way to transform impossible.