Why are their more calories in dry pasta and rice than their is when it is cooked?

It's really confusing me.

Oh plus, if I want to eat 4oz of rice or pasta, would I first weigh it at 2oz then cook it?
4 answers 4