The core component, the CPU, consists
itself of various sub-components,
all integrated in one microchip.
Because of its high density of micro-electronic
cicuits and the high-speed clock, the CPU of a
computer can get very hot, risking to burn
its own fragile circuitry — therefore it needs
cooling, at least by a ventilation fan.
At the core of the CPU lies the control unit,
cicuitry that works with the input, output and
control lines/registers and the program pointer.
As a "line of code" is read from the program memory,
the command register as well as one or more
operand registers are set from it, which
is called "fetching a command".
In the next phase of the control unit,
the command will be executed.
The command register is a set of command lines
that through circuitry define if an operand register
will be used as a memory input value (constant)
or the address (pointer/variable)
of a reading or writing operation.
It also sets the group of an address,
sort of a postal code to point to the "region"
in the computer where the address is found.
The CPU works with several internal groups
as well as with I/O ports (external groups).
The RAM is but one address group that a program
can read from and write to. Other groups are
I/O ports to and from I/O devices, including such
simple ones as the power-on LED and the beeper,
as well as special CPU sub-processor groups
such as the mathematical powerhorses
arithmetic-logical unit (ALU)
and floating-point unit (FPU).
To add two Bytes, both values are written into
the operand registers of the ALU, and then the
add-command reads the pre-calculated result.
Both operands work like address coordinates,
pointing x,y or column,row to an address in the
ALU lookup table at the "addition" offset.
In other words, both operands taken together and
extended by the command offset are the actual
address into the ALU's ROM, in this example.
(Not all results are stored as ROM lookup tables,
some are more efficiently generated
on the fly by Boolean circuitry.)
A very clever, and essential, trick is that also the
program pointer can be written to, so that
programs don't simply always run from start to end
in a fixed linear progression and then they end,
but they can loop and skip lines of code,
depending on programmed conditions.
And of course also the program memory itself
can be written to as a destination group, so that
programs can be loaded and run on demand.