Negatives come fairly early in an English sentence. The sentence becomes much easier to understand that way.
Your first example would be "I haven't done the homework" or "I did not do the homework". Note that the "not" attaches to the auxiliary verb, or at least follows it.
The other example is "I cannot go to visit".