What is a program counter? What is its use?

Answer Posted / amita

The program counter, or PC (also called the instruction pointer[1], or instruction address register[2], or just part of the instruction sequencer[3] in some computers) is a processor register that indicates where the computer is in its instruction sequence. Depending on the details of the particular computer, the PC holds either the address of the instruction being executed, or the address of the next instruction to be executed.
In most processors, the instruction pointer is incremented automatically after fetching a program instruction, so that instructions are normally retrieved sequentially from memory, with certain instructions, such as branches, jumps and subroutine calls and returns, interrupting the sequence by placing a new value in the program counter.
Such jump instructions allow a new address to be chosen as the start of the next part of the flow of instructions from the memory. They allow new values to be loaded (written) into the program counter register. A subroutine call is achieved simply by reading the old contents of the program counter, before they are overwritten by a new value, and saving them somewhere in memory or in another register. A subroutine return is then achieved by writing the saved value back in to the program counter again.

Is This Answer Correct ?    29 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many interrupts are there in 8085?

804


What is processor cycle (machine cycle)?

807


Explain what is the difference between isr & function call?

812


The operation being performed by the 8085 can be checked by which pins?

771


Why the temporary registers w and z are named so I mean we start from a,b,c,d,e then h and l coz h stands for higher bit nd l for lower bit of the address pinted by memory pointer....but wats w and z for?

750


What is 8051 microcontroller ?

854


Define bit, byte and word.

976


Explain about interrupt driven mode of data transfer

758


What jobs alu of 8085 can perform?

1031


Where the data is transferred in a DMA write operation?

913


What is stack pointer in 8051 microcontroller?

910


Explain why do you use two ground pins in microprocessor 8086?

860


What is 'daisy-chaining' in reference to the 8086?

933


Explain the different modes of operations of the 8086?

739


What is special purpose registers in 8086?

849