The computer’s brain is considered to be the central processing unit or CPU for many people, but the analogy is not inaccurate, because the human brain can do so much more than the CPU. The purpose of the CPU, is to process the needed information inside of a computer, in order to make that computer functional. The processing unit has several different components, which help the CPU perform steps, which can happen independently of each other.
The components found in the CPU are known as: the arithmetic logic unit or ALU, the control unit or CU, the I/O units, the cache and the registers. The ALU component, makes sure that the CPU is able to perform arithmetic operations and logic operations, such as addition, subtraction, multiplication, division, NOT, AND, and OR. In some computers the ALU can be divided, into two units known as the arithmetic unit and the logic unit. You would find some processors, with more than one arithmetic units, for fixed-point operations and for floating-point operations.
The ALU component is able to perform its operations, through multiple transistors, which are switches used, to manipulate binary numbers, which are only in two states of a switch, either an open or a close. The control unit or CU is the part of the CPU, which directs the flow of data that is going in and out of the CPU.
The ALU is able to perform its operations correctly at any time, due to the control signals, which are sent by the CU. In order to operate the other components of the CPU, the CU must generate digital signals, which are based on the instructions the CU has read, from the internal memory.
A computer may have a hardwired control unit, or a micro-programmable control unit, below you will see a diagram of each of these units. Block diagram of a hardwired control unit of a computer Microprogrammed control unit with a single level control store.
Another component of the CPU is the I/O component, which allow the communication, between the CPU and the rest of a computer system. The purpose of the I/O component on a CPU, is to allow a computer to be able to handle tasks, which involve reading and processing large quantities of data.
The cache, which memory on a CPU, is used in order to improve the speed of the CPU, because it is very slow to read data from external memory. Fifty percent or more, of the total area of a CPU, may be occupied by the cache on modern memories.
Cache is much faster than the external RAM, and it operates at the same speed of the processor. Depending on the chip, the cache would typically be one of its three different levels, level 1 (L1) cache is the smallest and faster cache, and the largest level, is level 3 (L3) cache, which is larger than level 2 (L2) cache.
Registers are also components of the CPU, these registers may be read-only or write-only, when they have specific components, and consist of small amount of fast storage. The stored information inside of registers, is used by the ALU, in order for it to carry out its functions correctly. Fetching, decoding, executing and storing, are the cycle of events, which a CPU takes, in order to execute a single instruction.
The image below depicts the main components of the CPU: CPU Buses: data is transferred through these buses from registers, to memory to ALU. MAR (Memory Access Register): memory, which need to be accessed via the address bus, is stored on this type of memory access register.
MBR (Memory Buffer Register): data which was read from memory, or is ready to be written to memory is stored on the MDR Program Counter: the PC is used in order to know which commands, needs to be executed next or the command that is executed at the current time.
Stack Pointer: the address of the last program request, is stored on the SP, in order to make sure that the operations are performed correctly. Instruction Decoder: Program instructions, are converted into an operations, which are executed in sequence, by the instruction decoder.
https://edux.pjwstk.edu.pl/mat/264/lec/main75.html http://www.cse.iitm.ac.in/~vplab/courses/cs1300/PDF/INTRO-CO+DD.pdf http://www.science.smith.edu/~jcardell/Courses/CSC103/L5.pdf https://www.dlsweb.rmit.edu.au/set/Courses/Content/CSIT/oua/cpt160/2014sp4/chapter/04/CPUArchitecture.html