How does buddhism describe what exactly, or where exactly, or how exactly, consciousness exists? As a computer scientist interested in the origin of the universe and the mind, I finally have found some ancient stuff of the type of substance and depth I am looking for, the Abhidhamma. The first part of the Vibhanga (one of the sections of the Abhidhamma) talks about &quot;aggregates&quot; or &quot;heaps&quot; or &quot;groups&quot;, Skandha. This to me seems like it is near the foundation of what a computational model of consciousness would need to consider, as consciousness is one of the types of heaps or skandha.
My question at this point in learning about this is, how exactly is consciousness structured in this model? Where does consciousness exist exactly. As a human being, I feel my body, but my conscious awareness feels like it is in the center of my brain, literally at a pin point. I can understand and model how a consciousness can use sensory organs to perceive information, but I don't understand how the consciousness itself can form. If everything is information in the end, or bundles of flowing information like these heaps/skandha, how does it aggregate and flow in a bundle in such a way to generate consciousness which you can feel?
I can even go so far as to imagine something like a biological cell with its complicated machinery going so far as to gain control over its environment, so that as a machine it is so complex and highly functional that it acts like a conscious being. This isn't too hard to imagine. But what is hard to imagine is how the consciousness is stored, or where it is! How can I perceive and feel the perception is in the center of my brain? What does skandha and the Abhidhamma have to say about this, it's structure?
As a computer scientist you are bringing some baggage with you that will continue to get in the way of what you want to find in the Dharma. I am speaking from the perspective of a computer scientist that spent thirty years looking into the same questions you are asking, ultimately finding the answers  in contemplative practice.
While consciousness is categorized in the Dharma in ways that may have led you to believe that consciousness is some thing that exists separate and apart from its cognitive contents, reaching out to contact that content, the actual structure, which you can discover first-hand through meditative practices (today’s mindfulness meditation being the first baby-step on the path) is the inverse of what you believe it to be.
For me, the ultimate roadblock on the path you are following was explaining human creativity (rather than explaining it away), because, upon analysis, the proposed solutions to explaining it always assumed the result, and thus were never more than magical thinking. An example is the foundational belief, found widespread in many fields of knowledge, that order arises randomly—and sticks around—without some organizing principle driving it. That’s magical thinking.
Consciousness of some object being taken as a structure of real things harboring a ghost in the machine that somehow imparts a new feature onto its dull matter, no matter how subtly the mechanism is crafted, must assume as a given, the ability to know, be aware, or be cognizant of those skandas you’ve read about. It’s not to be found in dull matter, so you have to turn the problem around.
If you want a textual reference to an in-depth treatment of mind, and specifically “where is mind?” I highly recommend the Surangama Sutra, also known as The Sutra of Heroic Progress. There are three extant English translations of it, with my favorite being the Goddard translation because of it’s conciseness (repeating material being skipped), and the lengths gone to by the translators and the editor, Goddard, to not use unfamiliar terminology.