|PrevChapter 5. The MIPS Architecture||Next|
All contents of a computer system are synchronized by a clock pulse,which is a logic signal the alternates between 0 and 1at constant intervals. On many digital circuits such as computers,events room triggered as soon as the clock transitions native 0 to 1(leading edge) or once it transitions from 1 come 0 (trailing edge).
You are watching: What does a program counter do
1 2 3 4 5__--__--__--__--__--__--__--__--__--__--__--__--__The manage unit sends out out a batch of manage signals at eachclock pulse. This signals will take some time come propagate (travel)through the circuits to your destination.
Components being regulated by the this signals will thenrespond to those signal at the following clock pulse. For example,if the manage unit sends out a signal at pulse 1 informing aregister to pack a new value, the register will pack the valueat pulse 2.
See more: Question : Which Of The Following Is An Incorrect Match ? Unit 4 Exam Flashcards
The clock rate of a processor is minimal by how long that takesfor signal to propagate. For instance, in a 3GHz computer, signalsmust propagate between the most straightforward CPU elements within1 / 3,000,000,000 or a second.
many CPUs save on computer a small number (usually 8, 16, or 32) of registers for storing data. It is registered are like memory cells, however are component of the CPU rather than ~ above a separate chip. They deserve to usually be accessed in a fraction of the moment it take away to access RAM exterior the CPU. Hence, assembly language programmers and compiler-writers try to use registers quite than storage in order to optimize because that speed. As you will certainly see, this often means sacrificing readability, and also necessitating more comments, since register names are fixed, unequal memory locations which deserve to be offered descriptive variable names.
The program respond to (sometimes referred to as instruction pointer) is a special-purpose register that contains the memory deal with of the following instruction to be executed. Every indict is fetched from exterior memory at the address in the regime counter, and stored in the indict register.
when a computer system is very first powered on, the computer is loaded with the resolve of an indict in ROM (BIOS or firmware), which starts the boot sequence. On a PC, the BIOS starts loading the operation system, which consequently loads and also runs other programs.
when you operation a program, the OS lots the maker code from the executable file into RAM, and also sets the program counter to the memory attend to of the very first instruction of the program.