negative particle, a word expressing negation, denial, refusal, or prohibition, mid-13c., unstressed variant of noht, naht "in no way" (see naught). As an interjection to negate what was said before or reveal it as sarcasm, it is attested by 1900, popularized 1989 by "Wayne's World" sketches on "Saturday Night Live" TV show.
Not, spoken with emphasis, often stands for the negation of a whole sentence referred to: as, I hope not (that is, I hope that the state of things you describe does not exist). [Century Dictionary, 1895]
To not know X from Y (one's ass from one's elbow, shit from Shinola, etc.) was a construction attested from c. 1930 in modern use; but compare Middle English not know an A from a windmill (c. 1400). Double negative construction not un- was derided by Orwell, but is persistent and ancient in English, popular with Milton and the Anglo-Saxon poets.