A functional unit is one of the many individual, but interconnected, hardware and software components (processing units) within the central processing unit (CPU) that as a unified group carries out the functions of the CPU. Each component is responsible for accomplishing one specific aspect of the CPU's over-all function. The CPU consists of minuscule circuitry that serves as the main information processor in a computer. It is generally a single microprocessor made from a small disk of semiconducting material (usually silicon) with millions of electrical components on its surface. The CPU must also be able to reference memory and input/output (I/0) devices in the execution of instructions. In addition, the CPU should be able to recognize and respond to external control signals, such as "wait" and "interrupt" requests.
CPUs are likely to contain functional units that perform such activities as fetching instructions from memory, interpreting and implementing software instructions, performing calculations and comparisons, decoding and executing logical decisions (determining if a statement is true or false based on the rules of Boolean algebra), temporarily storing information for use by other CPU functional units, keeping track of the current step in the execution of a program, and allowing the CPU to communicate with other parts of the computer.
Some of the functional units within a CPU that enable it to perform its functions are: (1) The arithmetic-logic unit (ALU) performs arithmetic and logic functions (operations) on binary numbers (0 and 1). The ALU possesses a "bypass function" to more efficiently transfer instructions, and "output status bits" that indicate if the result of the current operation is negative, zero, or twos-complement overflow. The ALU also contains an "adder" that combines the contents of two registers (special memory units containing data for direct-access by the CPU) with respect to the rules of binary arithmetic. This qualification allows the processor to perform arithmetic operations on data that it obtains from memory and from its other inputs. With assistance from the adder a programmer can write routines that will add, subtract, multiply, and divide, so the machine is capable of complete arithmetic computations. Most ALUs also provide other built-in functions, including Boolean logic operations, hardware subtraction, and shift capabilities. (2) The control circuitry maintains the proper sequence of events (with the use of a clock) required for any processing task. After an instruction is fetched and decoded, the control circuitry issues the appropriate signals (to units internal and external to the CPU) for initiating the proper processing action. (3) The accumulator stores operands (quantities on which a mathematical operation is performed) to be manipulated by the ALU. A typical instruction might direct the ALU to add the contents of some other register (temporary storage units within the CPU) to the contents of the accumulator and store the result in the accumulator itself. In general, the accumulator is both a source and a destination register. (4) The memory data register is used to interface the CPU with the memory for read/write operations to and from the memory. (5) The memory address register allows the CPU to interface with the memory address lines by holding the address of a memory location that is accessed for data. (6) The register file is capable of reading from one register and writing to another at the same time. (7) When the CPU transmits an address in its program counter to memory, and the memory returns the addressed byte to the processor, the CPU stores this instruction byte in the instruction register and decoder. It is then used to supervise activities during the rest of the instruction execution. The bytes stored in the "instruction register" can be decoded and used to activate one of a number of output lines. The activated line can be combined with timing pulses in order to develop electrical signals that can then be used to initiate specific actions. The "instruction decoder," along with control circuitry, performs this code translation.
More functional units are: (8) The stack pointer is used as an index register when pushing data onto the stack. The stack is a region of memory allocated for the storage of the system state. (9) The program counter is used to hold the address of the next program instruction. Each location in memory is numbered, to identify it from other memory locations. The number that identifies a memory location is called its "address." (10) The processor status word is used to store the outcome of an operation. It records if the result is negative, zero, or a twos complement overflow, an important function when dealing with conditional branching. (11) The barrel shifter (and rotator) consists of a hardware device that can shift (or rotate) a data word by any number of bits in a single operation.
This is the complete article, containing 788 words
(approx. 3 pages at 300 words per page).