The CPU, or central processing unit, is the heart of a com-puter, the place where data is brought in from input devices, processed, and sent to output devices. (This article describes the CPU from the point of view of desktop micromputers, where it is a single large silicon chip and supporting chips; see mainframe for a discussion of that earlier architecture, microprocessor for desktop and portable CPUs, and chip and chipset for physical design of components.)
The CPU consists of two major parts. The arithmetic-logic unit performs arithmetic or logical operations on pairs of numbers brought in from memory and stored in special locations called registers (see arithmetic logic unit). For example, the CPU can add a value from main memory to a value stored in a register and store the result back into memory. In addition to addition, subtraction, multiplica-tion, and division, the CPU can logically compare the indi-vidual bits in two values, performing such operations as AND, where the result is 1 only if both bits are ones, or OR, where the result is 1 if either bit is one. The power of a CPU is measured either in the number of clock cycles that drive it each second (see clock speed) or the number of standard instructions it can execute in a second. For modern PCs, clock speeds range into the billions of cycles per second (gigahertz) and millions of instructions per second (most instructions take more than one cycle to be completed).
The other key part of the CPU is the control unit, which determines when (and which) instructions will be executed. Operations to be performed are specified by instruction val-ues that are the lowest level representation of program code, sometimes called machine code. An index register is used to keep track of the current instruction. As instructions are processed, control signals can indicate special conditions,
No comments:
Post a Comment