answersLogoWhite

0


Best Answer

The instruction register holds a pointer to the current instruction (in working memory) while the next instruction register points to the next instruction (the first instruction immediately after the current instruction's operands). If the current instruction is a jump instruction, it can change the next instruction register, allowing the program to branch to a new instruction once the jump instruction is processed. The next instruction pointer is automatically moved into the current instruction register once the current instruction has been processed. The entire process of executing an instruction is known as the fetch-decode-execute cycle.

User Avatar

Curtis Strite

Lvl 13
2y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

An instruction cycle (sometimes called fetch-and-execute cycle, fetch-decode-execute cycle, or FDX) is the basic operation cycle of a computer. It is the process by which a computer retrieves a program instruction from its memory, determines what actions the instruction requires, and carries out those actions. This cycle is repeated continuously by the central processing unit (CPU), from bootup to when the computer is shut down.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How does the CPU keep track of which instruction to execute next?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which register in 8086 contains the address of the next instruction to be fetched?

program counter holds the address of the next instruction.


How program instructions transfer in and out of memory?

The instructions have to remain in memory at all times while the program is running. They get there by loading the entire program into memory. The CPU's instruction registers keep track of the current instruction and the next instruction.


What registers is used to keep track of address of the memory location where the next instruction is located?

Instruction pointer (IP) is used to hold the offset of the next instruction to be fetched for BIU available from Code Segment whose base address is held in CS segment base register..


What is the consists in the Instruction register?

The Instruction Register contains the current instruction being executed. It is an internal, special register, and you can not do anything explicit with it. If you are referring to the Program Counter, that simply contains the address of the next instruction to execute. It is incremented for each opcode and operand byte fetched.


What component of the computer keeps track of the address in memory of the programming instruction being executed?

A stored-program computer at least needs to know which instruction it has to execute next. Other memory addresses of special significance are e.g. the top of one or more stacks, or addresses to be used by instructions.To keep track of such addresses, all CPUs have one or more registers; for instance the address of the next instruction is stored in the instruction pointer, a.k.a. program counter. Which and how many registers of a CPU are designated to keep addresses depends on the CPU type. The Z80 for instance has a program counter, a stack pointer, two index registers and an indirect address register doubling as 16 bit accumulator, while the contemporay 6502 only has a program counter and a stack pointer.


Why contents of a program counter change?

The PC (program counter) is a CPU memory variable, commonly called a "register," that the CPU uses to track where the current executing instruction is located in memory, or on some CPUs, where the next instruction to execute is. Without a PC, the CPU would not know where the code it is currently executing is stored, and thus would not be able to run programs.


What is Function of IP register in 8086?

The IP register contains the address of the next instruction to fetch and execute. Normally, IP is incremented by the number of bytes in the instruction after execution of that instruction, unless a transfer of control occurs, in which case IP is loaded with a new value.


What is the difference between the instruction location counter and the program counter?

The Instruction Location Counter is a variable inside of the assembler. While the Program Counter is a register. The PC solely keeps track of the next instruction in a program, ILC increments by each instruction's operand length.


How would you describe the fetch execute cycle?

Fetch Execute Cycle A more complete form of the Instruction Fetch Execute Cycle can be broken down into the following steps: 1. Fetch Cycle 2. Decode Cycle 3. Execute Cycle 4. Interrupt Cycle 1. Fetch Cycle The fetch cycle begins with retrieving the address stored in the Program Counter (PC). The address stored in the PC is some valid address in the memory holding the instruction to be executed. (In case this address does not exist we would end up causing an interrupt or exception).The Central Processing Unit completes this step by fetching the instruction stored at this address from the memory and transferring this instruction to a special register - Instruction Register (IR) to hold the instruction to be executed. The program counter is incremented to point to the next address from which the new instruction is to be fetched. 2. Decode Cycle The decode cycle is used for interpreting the instruction that was fetched in the Fetch Cycle. The operands are retrieved from the addresses if the need be. 3. Execute Cycle This cycle as the name suggests, simply executes the instruction that was fetched and decoded


On traditional IBM mainframe what PSW is a special register that holds the address of the nest instruction to be executed?

Yes, the "Current PSW" contains machine state and next instruction address. It is a 64 bit register, and bits 33-63 (AMODE=31) or bits 40-63 (AMODE=24) contain the address of the next instruction to be executed. Certain "restartable" instructions, while in flight, will maintain the current instruction address until the sequence is complete, and certain exceptions, "early exceptions", will contain the current instruction address but, in general, the PSW (33-63) contains the address of the next instruction to execute.


What is the difference between instruction registers and instruction pointer?

instruction register is used to store the next instruction to be executed. instruction pointer is used to store the address of the next instruction to be executed.


Why is it important to have a good night sleep?

so you have energy for the next day and you keep on track.