Summary
Highlights
A computer is defined as an electronic device that takes an input, processes data, and delivers an output. This can be a simple calculation or complex interactions like those in a game console.
To process data, a computer follows a set of instructions known as a computer program. Key components include memory, which stores the program, and the Central Processing Unit (CPU), which carries out the instructions.
A computer functions by continuously and repetitively fetching, decoding, and executing instructions billions of times a second. This is known as the fetch-execute cycle.
During the fetch cycle, the CPU retrieves the next instruction from the computer's main memory (RAM) and brings it into the CPU.
After fetching, the CPU decodes the instruction, inspecting it and breaking it down to understand what action needs to be performed.
Once decoded, the CPU carries out or executes the instruction. This can involve various actions, such as accessing data from memory, performing calculations, or storing information back into memory.
On a modern CPU, the fetch-execute cycle occurs billions of times per second, which is referred to as the processor's clock speed. Clock speed is measured in hertz, with one hertz being one cycle per second.