A computer is a device of device controlled by a special device called a CPU.
It consists then of:
This invention of the transistor started the whole computer industry as it permits automatic switching of electric signal.
Hardware is a specific physical implementation of a logical computer represented by an Instruction Set Architecture (ISA) and an organization.
Code (Machine code) in a computer are called instructions.
All computer operations are carried out by a device and are built from the combinations of logic gates (ie the combinations of boolean functions). Se Instruction - Cycle
The function is built at hardware level.
Example:
A lot of function can be programmed without modifying its hardware.