A microprocessor is a programmable semiconductor device that is used for executing instructions to process digital data or exercise digital control over other devices. It is employed primarily as the central processing unit (CPU) of a computer system.  The complexity of present-day microprocessors make even a modest description of how they work beyond the scope of this page.  Thus, what is presented below is the architecture of a typical microprocessor from a couple of decades ago. The following discussion, simple as it is, nonetheless gives a reasonable understanding of how microprocessors in general work.



As mentioned, a microprocessor is used to execute a series of steps or instructions, which collectively constitutes a 'program'.  Every microprocessor has a unique set of instructions that it can execute.  This set of instructions is known as its, well, instruction set. Every instruction on the instruction set does something unique, and has different requirements in terms of which part(s) of the microprocessor to utilize or what data to work on.


A basic microprocessor circuit has the following parts: 1) an Arithmetic and Logic Unit (ALU), which is where the arithmetic and logic operations of the microprocessor take place; 2) a data bus system where data that need to be processed are transported; 3) an address bus system that provides the address of the memory location being accessed; 4) a control unit for orchestrating the program execution of the microprocessor; 5) an instruction register/decoder where instructions are loaded one at a time and 'interpreted'; 6) a program counter that indicates the memory address where the next instruction will come from; and 7) various registers, flags, and pointers.


A microprocessor executes a program stored in memory by fetching the instructions of the program (and whatever data they require) one at a time and performing these instructions.  Memory in this context basically refers to external memory devices that complement the microprocessor and the input/output devices of the computer system. The manner in which the next instruction will be executed depends on the results of the last operation.  Thus, the output of the microprocessor depends on the instructions and the input data provided to it.


Microprocessors with different ALU designs have different arithmetic and logic capabilities.  For instance, some ALU's can handle all the basic arithmetic functions directly, while the simplest ones only perform addition and shift operations, which are also the steps used to emulate all other arithmetic functions such as multiplication and division. The logic capability of the ALU also varies from one microprocessor to another,  but almost all ALU's can perform the AND, OR and EXOR.


You May Like These
Samsung Fast Charge Wireless Charging Stand W/ AFC Wall Charger
Rexing V1 Car Dashboard Camera Recorder 2.4-inch LCD FHD 1080p Wide Angle

The instructions being followed by a microprocessor come in the form of instruction codes. Instruction execution can not occur haphazardly, and must be controlled precisely as it happens. The control unit of the microprocessor is the one responsible for controlling the sequencing of events needed for the execution of an instruction, as well as the timing of this sequence of events.  The control unit is complemented by a clock or timing generator that helps it trigger the occurrence of each event at the correct point in time.


The program counter of a microprocessor indicates where the next instruction bytes are located in memory. It is indexed by the control unit by 1 every time an instruction code is transferred from memory to the microprocessor.   


A microprocessor uses the instruction register to store the instruction code last fetched from memory.  The first byte of an instruction code is fed by the instruction register to the instruction decoder, which 'decodes' it to determine which operation must be carried out, how many bytes of data will be processed, and where to get these data. After instruction decoding, the execution of the instruction proceeds.


Registers are elements composed of a set of flip-flops where data are stored temporarily for subsequent processing or transfer, as the microprocessor goes about its task of executing its instructions one at a time. The accumulator is a special register used by the microprocessor for holding operands, or data to be manipulated by the ALU.  Aside from the accumulator, several general-purpose registers are also available to the microprocessor for holding data that need to be operated on.


Microprocessors also have Status Flags, which are really just special registers for storing the state of a condition that results from a previous operation.  Examples of status flags include: 1) the Carry Status Flag, which indicates if there's a need to do a 'carry' after addition or a 'borrow' after subtraction; 2) the Zero Status Flag, which indicates if a given operation in the ALU results in a 'zero'; 3) the Sign Status Flag, which indicates whether the result of an ALU operation is negative or positive; 4) the Overflow Status Flag, which indicates if an operation produces a result that can't fit into the specified word length; and 5) the Parity Status Flag, a flag (used in error detection) that is set if the result of an operation contains an even number of 1's.    


The microprocessor has been around for more than two decades already.  It now comes in many forms, sizes and levels of sophistication, powering all kinds of applications that rely on 'computer control'.  Although it is the central processing unit of a computer system, it also needs to interact with other semiconductor devices in order to perform its functions.  These 'other' devices include the memory and input/output devices that constitute the rest of the computer system.


See Also:  What is a Semiconductor?DSP'sSRAMsDRAMs




Copyright 2005 www.EESemi.com. All Rights Reserved.