Information theoretic foundations of physics