Von Neumann defined the basic structure of a computer: the central processing unit (CPU), memory, and input/output devices (IO). Both data and programs are stored in memory, and the contents in memory are addressed by location.
The main function of a computer system is to execute a program, a set of instructions. The CPU is responsible for executing instructions and exchanging data with memory. These instructions are translated into machine language and executed to process data already loaded into the computer’s memory. Input devices are used to enter data into memory. After the data is processed, the results are either stored in memory for further reference or sent to the outside world via an output device.
Programs don’t always execute sequentially; It might jump somewhere else. Similarly, data operations may require multiple cells to be accessed at once in a predetermined order. Therefore, there must be a place where instructions and data can be stored temporarily. This module is called internal storage or main storage, as distinct from external storage or external devices.
Instruction processing process is called instruction cycle, instruction cycle is divided into fetching instruction cycle and executing instruction cycle. At the beginning of each instruction cycle, the processor takes instructions out of memory and puts them into an instruction register (IR). The processor decodes the instructions and performs the required operations :1) Data transfer between the processor and memory; 2) Data transmission between processor and input/output device; 3) Perform arithmetic or logical operations on the data; 4) Change the order of instruction execution.
The three basic modules of a computer :CPU, memory, and input/output (I/O) are integrated through an interconnect structure. Memory usually consists of N units of equal length, each assigned a unique numeric address (0,1… , N-1), which can be read or written from memory. The nature of the operation is indicated by the read/write control signal, and the location of the operation is specified by the address. I/O is similar to memory in that it has both read and write operations. In addition, a single I/O module can control multiple peripherals and can also send interrupt signals to the processor. The processor reads instructions and data and writes the data after processing. The processor uses the control signal to control the operation of the whole system, and can also receive the interrupt signal.