The math of the calculations that occur in the brain is different, although related, to the math involved in the accumulation of experience that we call consciousness. What we consider a thought is really the accumulation of much smaller pieces of that thought experienced by each cell. To understand the feeling of consciousness, the experience of consciousness, we need to theoretically understand how a nerve cell can have a range of feeling in relation to the nature of it's firings. This heightened experience is pleasure. The intelligence comes from the seeking of the greatest amount of low frequency firing, or longer uninterrupted periods of firing, than not.
All intelligence is the seeking of pleasure and the avoidance of pain.
For the pleasure to exist, pain has to exist too. But when a cell is not firing it is not having an experience. But a transition from pleasure to nothing is a transition after all. It is a something between the pleasure and not having the pleasure. That period of time at the beginning or end of the action potential is the moment of pain.