Genesis 7:2 (NKJV)
"You shall take with you seven each of every clean animal, a male and his female; two each of animals that are unclean, a male and his female
Genesis 8:20 (NKJV)
Then Noah built an altar to the LORD, and took of every clean animal and of every clean bird, and offered burnt offerings on the altar.
According to these passages, Noah knew about clean animals and clean birds.
How did Noah know this even before the Law was given?