I believe I understand your concern because similar confusion arose at some point in my English study, too, due to a linguistic difference between my native tongue and English. Your language is perhaps like mine, Thai, where you answer to the truth condition of the statement of the question rather than the truth itself. For example, if you ask, in Thai, "aren't you going to school today?" and the answer is "yes," the answerer means they are not going to school. "Yes" here is "yes, (it is true that I am not going to school)," not "yes, (I'm going to school.)"
I think it helps if you think of English as somewhat simpler than that. In English, whether you answer "yes" or "no" only depends on the reality and has nothing to do with how the question is worded. Whether the question is "do you know?" or "don't you know?," "yes" and "no" still have the same meanings: in both cases, if you answer "yes," it means "you know," and if you answer "no," it means "you don't know."
Answering with plain "yes" or "no," however, may sound too flat and could sometimes be misunderstood, so it's safer to respond with a complete answer like "yes, I do." (meaning, you know) or "no, I don't" (meaning, you don't know) if you can't think of anything fancier like "no, I never knew," or "no, this is the first time I've heard about it!"
As stated by other Answerers, one thing to consider is that sometimes "don't you know?" is a rhetorical question, meaning the speaker doesn't actually expect an answer, so you don't have to answer them. You usually can guess from context whether it is an actual question or not.