Tuesday, 13 December 2016

The Processor

Introduction


A processor is the logic circuitry that responds to and processes the basic instructions that drive a computer. The four primary functions of a processor are fetch, decode, execute and writeback.

The basic elements of a Processor:

  •  The arithmetic logic unit (ALU), which carries out arithmetic and logic operations on the operands in instructions. 


  •  The floating point unit (FPU), also known as a math coprocessor or numeric coprocessor, a specialized coprocessor that manipulates numbers more quickly than the basic microprocessor circuitry can.


  •  Registers, which hold instructions and other data. Registers supply operands to the ALU and store the results of operations.


  •  L1 and L2 cache memory. Their inclusion in the CPU saves time compared to having to get data from random access memory (RAM).


- Most processors today are multi-core, which means that the IC contains two or more processors for enhanced performance, reduced power consumption and more efficient simultaneous processing of multiple tasks (see: parallel processing)
.
- Multi-core set-ups are similar to having multiple, separate processors installed in the same computer, but because the processors are actually plugged into the same socket, the connection between them is faster. 

- The term processor is used interchangeably with the term central processing unit (CPU), although strictly speaking, the CPU is not the only processor in a computer.

- The GPU(graphics processing unit) is the most notable example but the hard drive and other devices within a computer also perform some processing independently. Nevertheless, the term processor is generally understood to mean the CPU.

- The processor in a personal computer or embedded in small devices is often called a microprocessor. That term simply means that the processor's elements are contained on a single integrated circuitry (IC) chip.

The Central Processing Unit (CPU)

Figure 1 : The Central Processing Unit

- The computer does its primary work in a part of the machine we cannot see, a control center that converts data input to information output. 

- This control center, called the central processing unit (CPU), is a highly complex, extensive set of electronic circuitry that executes stored program instructions. 

- All computers, large and small, must have a central processing unit. As Figure 1 shows, the central processing unit consists of two parts: The control unit and the arithmetic/logic unit. 

- Each part has a specific function.

- Before we discuss the control unit and the arithmetic/logic unit in detail, we need to consider data storage and its relationship to the central processing unit. 

- Computers use two types of storage: Primary storage and secondary storage. The CPU interacts closely with primary storage, or main memory, referring to it for both instructions and data. 

- For this reason this part of the reading will discuss memory in the context of the central processing unit. Technically, however, memory is not part of the CPU. 

- Recall that a computer's memory holds data only temporarily, at the time the computer is executing a program. 

- Secondary storage holds permanent or semi-permanent data on some external magnetic or optical medium. The diskettes and CD-ROM disks that you have seen with personal computers are secondary storage devices, as are hard disks. 

- Since the physical attributes of secondary storage devices determine the way data is organized on them, we will discuss secondary storage and data organization together in another part of our on-line readings. 

Components of the Central Processing Unit

1) The Control Unit 

- The control unit of the CPU contains circuitry that uses electrical signals to direct the entire computer system to carry out, or execute, stored program instructions.
- The control unit does not execute program instructions; rather, it directs other parts of the system to do so. The control unit must communicate with both the arithmetic/logic unit and memory. 

2) The Arithmetic/Logic Unit 

- The arithmetic/logic unit (ALU) contains the electronic circuitry that executes all arithmetic and logical operations. 

- The arithmetic/logic unit can perform four kinds of arithmetic operations, or mathematical calculations: addition, subtraction, multiplication, and division. 

- As its name implies, the arithmetic/logic unit also performs logical operations. A logical operation is usually a comparison. 

- The unit can compare numbers, letters, or special characters. The computer can then take action based on the result of the comparison. 

- This is a very important capability. It is by comparing that a computer is able to tell, for instance, whether there are unfilled seats on airplanes, whether charge- card customers have exceeded their credit limits, and whether one candidate for Congress has more votes than another. 

Logical operations can test for three conditions: 

Equal-to condition. In a test for this condition, the arithmetic/logic unit compares two values to determine if they are equal. For example: If the number of tickets sold equals the number of seats in the auditorium, then the concert is declared sold out. 

Less-than condition. To test for this condition, the computer compares values to determine if one is less than another. For example: If the number of speeding tickets on a driver's record is less than three, then insurance rates are $425; otherwise, the rates are $500.
Greater-than condition. In this type of comparison, the computer determines if one value is greater than another. For example: If the hours a person worked this week are greater than 40, then multiply every extra hour by 1.5 times the usual hourly wage to compute overtime pay.


What is the function of the processor?

- The CPU has two main components, the arithmetic/logic unit and the control unit. The control unit directs other portions of the computer system to carry out or execute program instructions. 

- The arithmetic/logic unit executes all the arithmetic and logical instructions.
The four core functions of the CPU are to fetch, decode, execute and store. 

- The first thing the CPU does is to fetch the instruction from the program memory. It decodes the instruction, which is then moved to the arithmetic/logic unit.

- The arithmetic/logic unit then executes the instruction. At this stage, the processor can do one of three things: perform mathematical operations, move date from one memory location to another or jump to a bunch of new instructions based on the decision it makes. 

- Finally, the arithmetic/logic unit stores the output of the operation into the computer's memory.
The performance and speed of the CPU depends on the clock rate, which is the speed at which a processor executes instructions, and the instructions per clock.


0 comments:

Post a Comment