Navneeth Baliga
Navneeth Baliga

Reputation: 179

Size of Program Counter

What would be the size of Program Counter in terms of bits? Is the size always fixed in all types of system architectures?

Upvotes: 2

Views: 14008

Answers (3)

user12793470
user12793470

Reputation: 1

A program counter is one of the register used in computer architecture and os. It holds the address of next instruction to be executed. After instruction is executed, it will incremented by one,(PC =PC +1) moreover program counter will be point to the next instruction. It is mainly used in conditional jump and un conditional jump instruction to calculate the effective address .

Upvotes: 0

Tudor
Tudor

Reputation: 62439

The Program Counter is a special purpose Register that holds the address of the instruction being executed or of the next instruction to execute (this seems to depend on the architecture). Consequently it has the size of a machine word i.e. 32, 64 etc. bits.

Upvotes: 1

drdwilcox
drdwilcox

Reputation: 3951

The program counter is simply the location of the instruction being executed, and so it will change based on the processor architecture. That is, a 64 bit architecture will need 64 bits to hold the program counter, a 32 bit will need 32, and so on.

Upvotes: 0

Related Questions