It's codified in any number of state and federal statutes, but it generally doesn't come from codification - it comes from English common law ("ignorantia legis neminem excusat", or "ignorance of the law excuses no one').
The U.S. Government and 49 of the 50 U.S. States have adopted English common law as the basis for their legal system (only Louisiana did not).
I'm merely answering your question. I will note that there is no person alive who knows the content of all federal regulations.
I understand that- and I thank you for that explanation
I guess my point is that it is no longer possible to know all the laws, therefore you should never be held guilty for not knowing a law.
I would love to see this tested in court, and used as a basis for simplifying the whole legal system