Central Processing Unit (CPU)

Central Processing Unit (CPU)

The central processing unit (CPU) is often called the processor of the computer.  CPU interrupts and carries out the basic instructions that operate a computer. The CPU significantly impacts overall computing power and manages most computer operations. The devices attached to the computer interconnect with the CPU in order to carry out a task.

Central Processing Unit
Central Processing Unit

                The CPU contains two fundamental sections: The Control Unit (CU) and the Arithmetic and logic Unit (ALU). These two components work together with RAM and other internal memories to make the processor and the computer system go.

The Control Unit (CU)

                The control unit of the Central Processing Unit selects and interprets program instructions, and then sees that they are executed. It has some special purpose registers and a decoder to execute these actions. The special purpose registers, namely the instruction registers and the program control registry, respectively hold the current instruction and the next to be executed, and in this way help the control unit in the instruction section. on the other hand, the decoder has the essential circuitry to decode and interpret the meaning of every instruction supported by the CPU. Each instruction is accompanied by microcode-very basic directions, which tell the CPU how to execute the instructions.

Central Processing Unit

Although the control unit does not perform any actual processing of the data, it acts as a central nervous system for the other components of the computer. It manages and coordinates the entire computer system, as well as the input and output units. It obtains instructions from the program stored in the main memory, interprets the instructions, and issues signals, which causes other units of the system and execute them.

The Arithmetic and Logic Unit (ALU)

                The arithmetic and logic unit performs all computations/calculations (addition, subtraction, multiplications, and division) and all other logic operations. The results are placed in a register called an accumulator.

Arithmetic operations include:

  • Comparison Operations involve comparing one data item to another to determine if the first item is greater than, equal to, or less than the other one.  Reliant on the result of the comparison, different activities may occur. To determine if any employee should receive overtime pay, the Alu compares the number of hours an employee worked during the week to the regular time hours allowed (40 Hours, for instance). If the hours worked are greater than 40, the ALU computes an overtime wage. If hours worked are not greater than 40, the ALU does not compute overtime pay.
  • Logical Operation use conditions along with logical operators such as AND, OR, and NOT. For example, if only non-salaried employees can receive overtime pay, the ALU must verify that the employee is non-salaried AND worked more than 40 hours before computing an overtime wage.
  • Instruction Set

          Every CPU has the built-in ability to execute a set of machine instructions, called its instruction set. Most CPU’s have 200 and more instructions (Such as add, subtract, and compare) in their instruction set. The machine language designed for a processor (CPU), is based on a list of instructions supported by the CPU in its instruction set. Since each processor has a unique instruction set, machine language programs written for one computer will generally not run on another computer, with a different CPU.

CPUs made by different manufacturers have different instruction sets. In fact, different CPU models of the same manufacturer also often have different instruction sets. However, manufacturers tend to their CPUs into “families”, which have similar instruction sets.

When a new CPU is developed, it is ensured that its instruction set includes all the instructions in the instruction set. Of its processor CPU, plus some new ones. This manufacturing strategy is known as upward compatibility, and the new CPU is said to be upward compatible with its processor. This feature allows software written for a computer with a particular CPU< to work on computers with newer processors of the same family. In turn, it allows the users of these computer systems to easily upgrade their system, without worrying about converting all their existing software.

  • Registers

As the instructions are interpreted and executed by the CPU, there is a movement of information between the various units of the computer system. In order to handle this process satisfactorily, and to speed up the rate of information transfer, the computer uses a number of special memory units, called registers. These registers are used to hold information on a temporary basis and are parts of the CPU (not main memory).

The length of the register equals the number of bits it can store. Hence, a register that can store 8 bits is normally referred 8-bit register. Most CPUs sold today have 32-bit or 64-bit registers. The size of registers is sometimes called the word size. The bigger the word size, the faster the computer can process a set of data. With all other parameters being the same, a CPU, with 32-bit registers can process data twice as fast as one with 16-bit registers.

Although the number of registers varies from computer to computer, there are some registers, which are common to all computers are the following.

  • Memory Address Register (MAR)
  • Memory Buffer Register (MBR)
  • Program Control Register (PC)
  • Accumulator Register (A)
  • Instruction Register (I)
  • Input/output Register (I/O)
  • Memory Address Register

          It holds the address of the active memory location. It is loaded from the program control register when an instruction is read from memory.

Memory Buffer Register

                It holds the contents of the memory word read from, or written in, memory. An instruction word placed in this register is transferred to the instruction register. A data word placed in this register is accessible for operation with the accumulator register, or for transfer to the I/O register. A word to be stored in a memory location must first be transferred to the MBR, from where is written in memory.

  • Program Control Register

          It holds the address of the next instruction to be executed. Normally, the instruction of a program is stored in consecutive memory locations, and read and execute in sequence, unless a branch instruction is encountered. A branch instruction is an operation, which calls for a transfer to a non-consecutive instruction. The address part of the branch instruction is transferred to the PC register, to become the address of the next instruction.

  • Accumulator Register

          It holds the data to be operated upon, the intermediate results, and the result of processing. It is used during the execution of most instructions. The results of arithmetic operations are returned to the accumulator register, for transfer to the main memory, through the memory buffer register. In many computers, there is more than one Accumulator register.

  • Instruction Register

          It holds the current instruction, which is being executed. As soon as the instruction is stored in this register, the operation part and the address part of the instruction are separated. The address part of the instruction is sent to the MAR, while its operation part is sent to the control unit, where it is decoded and interpreted, and ultimately command signals are granted to carry out the task specified by the instruction.

  • Input/Output Register

          It is used to communicate with the input/output devices. All input, and information, such as instruction and data, are transferred to this register by an input device. Similarly, all output information, to be transferred to an output device, is found in this register.

One thought on “Central Processing Unit (CPU)

Leave a Reply

Your email address will not be published. Required fields are marked *