What is a computer? – Computer hardware
Conventionally, the central unit of a modern digital* computer* consists of at least one processing element, typically a central processing unit (CPU) in the form of a
microprocessor, along with some type of computer memory. Both the CPU and the memory are typically made of semiconductorchips.
In the processing element the arithmetic and logic unit (ALU) carries out arithmetic and logicaloperations,* and a sequencing and control unit (CU) reads and interprets theinstructions* of the running program* sequentially. In some cases the CU can change the order ofoperations, e.g. in response to stored information.*
Peripheral devices includeinputdevices (keyboards, mice, joysticks, microphones, cameras etc.),outputdevices (monitors, printers, loudspeakers, projectors etc.), andinput/outputdevices that perform both functions (e.g. the 2000s-era touchscreens).
Storageunits (e.g. HDDs or SSDs, optical drives and discs like CDs or DVDs, USB flash drives etc.) andnetwork* adapters can also be considered as input/output devices. Such peripheral devices allow information to beretrievedfrom internal or external sources, and they enable the results of operations to besavedand retrieved again for further processing.*⇒
Computer hardware* is the physical portion (i.e. the technically implemented units) of a digital computer. Some of the main hardware units of a desktop computer are as follows:
- electrical and/or electronic components, e.g.
– microprocessor,
– random-access memory or RAM,
– motherboard,
– expansion cards,
– monitor,
– solid state drive or SSD,
– USB flash drives,
– various interfaces, ports and sockets,
– wires and cables,
– etc.- electromechanical components, e.g.
– hard disk drive or HDD,
– optical disc (CD, DVD or Blu-ray) drives,
– keyboard,
– mouse,
– microphone or headset,
– loudspeakers,
– video camera,
– cooler(s),
– power supply,
– etc.- mechanical components (e.g. the computer case).
The computer can operate automatically, that is, it is capable of executing the currently running program by itself, without any human intervention. At hardware level, the basis for the automatic operation is provided by the instruction cycle executed by the control unit through endless repetitions.
- The instruction cycle or fetch-execute cycle has two (or, actually, three) main steps which the control unit of the computer executes in an infinite cycle:
- in the first step the next instruction of the currently running program is obtained (i.e. "fetched") from the memory;
- in the second step the obtained instruction is executed;
- after the second step, or just before the first step, the computer examines whether or not an interrupt request has been sent, triggered or asked.
- When an interrupt signal indicates that a special asynchronous event occurred that needs to be handled (e.g. an I/O request sent, an error triggered, an action asked by the operator etc.), then
- the current sequence of instructions is temporarily suspended;
- the computer starts to execute a dedicated sequence of instructions called an interrupt handler (IH);
- when the IH fulfilled its task, then the interrupt handling process ends and it gives the control back to the interrupted process;
- the execution of the interrupted program, that is, the original sequence of instructions continues, as though nothing had happened.