In the processor (the brain of the computer).
The processor is the brain of the computer. All fundamental computing takes place in the processor. Other components contribute to the computation by doing such things as moving data into and out of the processor. But the processor is where the fundamental action takes place.
Unlike a human brain, which combines memory with processing power, a computer processor has very little memory. It must rely on other components to hold data and programs and to save results. The memory in a computer system is of two fundamental types:
Which is fastest? Main memory or secondary memory?