We introduce a computational framework for consciousness. We hypothesize that emergent rules of computation in the Universe lead to life and consciousness. We live in a Universe that has a substrate capable of computing or information processing. We suggest that in principle, any Universe that is capable of supporting information processing and has energy can evolve life and consciousness. We hypothesize that the Universe encodes rules in the form of physical laws that allow for the emergence of both life and conscious organisms. A key insight is that there are different levels of consciousness starting from atoms to organisms to galaxies. We propose a metric of complexity that can quantify the amount of consciousness in a system by measur...