13.07.2015 Views

Digital Electronics: Principles, Devices and Applications

Digital Electronics: Principles, Devices and Applications

Digital Electronics: Principles, Devices and Applications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

530 <strong>Digital</strong> <strong>Electronics</strong>to the address pins of the microprocessor <strong>and</strong> holds the absolute memory address of the data orinstruction to be accessed. The MBR, also known as the memory data register, is connected to the datapins of the microprocessor. It stores all data written to <strong>and</strong> read from memory.13.3.2.4 Status RegisterThe status register stores the status outputs of the result of an operation <strong>and</strong> gives additional informationabout the result of an ALU operation. The status of bits stored in the status register tells about theoccurrence or nonoccurrence of different conditions, <strong>and</strong> one or more bits may be updated at the endof an operation. Each bit is a Boolean flag representing a particular condition. The most commonconditions are the carry, overflow, zero <strong>and</strong> negative. For instance, a ‘1’ in the carry status bit positionshows that the result of the operation generates a carry. The significance of the status register lies inthe fact that the condition code set by the status of different bits in the status register forms the basisof decision-making by the microprocessor during the execution of a program.13.3.2.5 Stack PointerThe stack pointer is a register used to store the address of a memory location belonging to the mostrecent entry in the stack. In fact, a stack is a block of memory locations designated for temporarystorage of data. It is used to save data of another general-purpose register during execution of asubroutine or when an interrupt is serviced. The data are moved from a general register to the stackby a PUSH instruction at the beginning of a subroutine call, <strong>and</strong> back to the general register by a POPinstruction at the end of the subroutine call. Microprocessors use a stack because it is faster to movedata using PUSH <strong>and</strong> POP instructions than to move data to/from memory using a MOVE instruction.13.3.2.6 General-purpose RegistersThere is a set of registers for general-purpose use, designated as general-purpose registers. They areused explicitly to store data <strong>and</strong> address information. Data registers are used for arithmetic operations,while the address registers are used for indexing <strong>and</strong> indirect addressing. These enhance the processingspeed of the microprocessor by avoiding a large number of external memory read/write operationswhile an ALU operation is being performed, as it is much easier <strong>and</strong> faster to read from or write into aninternal register than to read from or write into an external memory location. Earlier microprocessorshad only one register called the accumulator for ALU operations. It needed at least four assemblylanguage instructions to perform a simple addition, including carrying data from an external memorylocation to the accumulator, adding the contents of the accumulator to those of another memorylocation, storing the result in the accumulator <strong>and</strong> transferring the contents of the accumulator back tothe external memory location. With the availability of a greater number of general-purpose registers,it would be possible to perform many ALU operations without even a need to store data in externalmemory.13.3.2.7 Temporary RegistersThese are used when data have to be stored during the execution of a machine instruction. They arecompletely hidden from the user of the microprocessor.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!