Microprocessors
529
13.3.1 Arithmetic Logic Unit (ALU)
The arithmetic logic unit (ALU) is the core component of all microprocessors. It performs the entire
integer arithmetic and bit-wise logical operations of the microprocessor. ALU is a combinational logic
circuit and has two data input lines, a data output line and a status line. It gets data from the registers
of the microprocessor, processes the data according to the instructions from the control unit and stores
the results in its output registers. All modern ALUs use binary data in 2’s complement format.
The integer arithmetic operations performed by the ALU include addition and subtraction. It
performs AND, OR, NOT and EXCLUSIVE-OR logical operations. Some 16-bit, 32-bit and 64bit microprocessors also perform multiplication and division operations. In other microprocessors,
the multiplication and division operations are performed by writing algorithms using addition and
subtraction operations. Some such algorithms were outlined in Chapter 3 on digital arithmetic. ALU
also performs the bit-shifting operations and the comparison of data operations.
13.3.2 Register File
The register file comprises various registers used primarily to store data, addresses and status
information during the execution of a program. Registers are sequential logic devices built using
flip-flops. Some of the commonly found registers in most of the microprocessors include the program
counter, instruction registers, buffer registers, the status register, the stack pointer, general-purpose
registers and temporary registers.
13.3.2.1 Program Counter
The program counter is a register that stores the address of the next instruction to be executed and hence
plays a central role in controlling the sequence of machine instructions that the processor executes.
After the instruction is read into the memory, the program counter is automatically incremented by
‘1’. This is of course on the assumption that the instructions are executed sequentially. Its contents
are affected by jump and call instructions. In the case of a jump instruction, the program counter is
first loaded with the new address and then incremented thereafter until another jump instruction is
encountered. When the microprocessor receives an instruction to begin a subroutine, the contents of
the program counter are incremented by ‘1’ and are saved in the stack. The program counter is loaded
with the address of the first instruction of the subroutine. Its contents are incremented by ‘1’ until a
return instruction is encountered. The saved stack contents are then loaded into the program counter
and the program continues, executing each instruction sequentially until another jump instruction or a
subroutine call is encountered. The interrupt process also alters the contents of the program counter.
13.3.2.2 Instruction Register
The instruction register stores the code of the instruction currently being executed. The control unit
extracts the operation code from the instruction register, which determines the sequence of signals
necessary to perform the processing required by the instruction.
13.3.2.3 Buffer Register
Buffer registers interface the microprocessor with its memory system. The two standard buffer registers
are the memory address register (MAR) and the memory buffer register (MBR). The MAR is connected
Précédent

- 546/741

Suivant