Tuesday, 24 July 2012

ARITHMETIC SECTION & CONTROL REGISTER

FUNCTIONAL BLOCKS

DESCRIBE IN DETAILS ABOUT ARITHMETIC & LOGIC SECTION

Accumulator

It is a 8 bit temporary register used at the time of various arithmetic and logical operations . The results of any operation performed by ALU is stored in accumulator(Acc) . The all input and output data are passed through the accumulator i,e, during the any operation it stores the operating data and after the operation it saves the result and passed at the output ports . So it is a KEY REGISTER and its size is same as the size of data bus .

Status register(PSW)

It is a special purpose register known as flag register  where the condition and states of the recent arithmetic or logic operations are stored .In 8-bit microprocessor the PSW is also 8 bit and different program status like Parity , Carry, Auxiliary carry , Zero ,Sign, Interrupt mask are stored at different bit position of the PSW . This information are very important for many arithmetic operations as it is used to inform where the result is negative or positive value or it has a carry which are very helpful for decide the conditional branching of proper steps .

ALU

ALU performs all the arithmetic and logical operations . The ALU uses the content of accumulator as the first operand and stores the results in the accumulator. It can operate on carry bit and ALU operate on any bit of the content of its register and even those of memory locations. Generally a 8-bit microprocessor have 8-bit ALU. An ALU performs the following operations
Arithmetic operations: - Addition, subtraction, increment, decrement, comparison, multiplication, division.
Logic operations: - Inclusive-OR , Exclusive-OR , AND , complement

DESCRIBE IN DETAILS OF CONTROL REGISTER

Program counter

It is a 16-bit register used to keep the track of program . At first the instructions are stored in memory location sequentially . Program counter is loaded with address of the memory location of the next instructions . When the execution of present instruction is completed the instruction stored in the location pointed by PC is fetched into instruction register(IR) for decoding . Whenever an instruction is fetched , the PC is updated to the next instruction and this process is continued until the power supply is off or any external interrupts occurs .
Sometimes the PC is first updated to fetch the next instruction and sometimes reverse in the operation depending on the variety of microprocessor . When the execution of the present instruction is going on , in some cases , fetching of next instruction and updating of PC may also be performed simultaneously , the phenomenon being known as parallel running or pipe lining .

Stack Pointer(SP)

It is 16-bit register for 8-bit microprocessor . It contains the address of the top of the stack which is a selected space of the memory where data may be stored in LIFO method . By using the PUSH instruction a data in a register or memory location may be stacked and a POP instruction un stacks a data from the stack to a register or memory location . After PUSH and POP instruction , SP uploaded to point at the current top of the stack .

Index Register(IX)

Index registers are used for addressing . The contents of index register are added to the memory address , the sum being the actual address of the data . If the contents of index registers are changed the effective address is also changed , Data can be transferred from one memory to another memory location by using index register . Some microprocessors have auto indexing capability where the index register is automatically incremented or decremented each time it is used . It contains the code to indicate whether indexing is being used.

No comments:

Post a Comment