"I knew better" means you were aware, and you engaged in(or did) something you shouldn't anyways. If you "know better" you don't do it to began with. "Did you go to the store?", is a question. Awnsering,"I did" means yes, and "I didn't" means no. I hope this helps. It seems complicated, but it helps me.