My first thought was that it was the intonation that implied the meaning, not the sound itself. But that's not the case. Regardless of how you say "uh huh" it still means "yes" or a similarly affirmative statement. The same applies for "uh uh" and the negative.
Also are these sounds found outside of the English language? What about outside the Germanic and/or Latin based languages?
hi! this question sounds like a job for /r/Linguistics. In fact, it has been asked a couple of times there already, although still lacking an answer to your title question