Clock Cycle
Table of Contents
Base Clock or System Clock
Every computer has a system clock that generates a stream of clock pulses. It is also called the base clock (BCLK) and is generally mounted on the motherboard of a computer. It comprises a quartz crystal oscillator, which when voltage is applied to it, produces an electrical signal at a very steady frequency.
For all components of the computer to work in tune with each other, including the CPU, they need to synchronize their working in step with the pulses of the system clock. Modern motherboards, irrespective of their make and type have a basic clock that produces a frequency of 100 Mhz.
The Control Unit of the CPU synchronises all the activities to the clock tick, much like an army marches to the beat of a drum or an orchestra plays to the stroke of the Leader.
CPU Clock
The CPU often works at a much higher frequency than the system clock frequency. The CPU frequency is derived by multiplying the system clock frequency by a multiplication factor also called a ‘CPU Ratio’ or ‘CPU Multiplier’.
For example, when the base clock frequency is 100 MHz and it is multiplied by 32 (CPU Multiplier) we get a CPU clock speed of 3.2 GHz. This is generally the frequency that manufacturers specify as the CPU frequency. If the CPU Multiplier is 26, the CPU frequency would be 2.6 GHz.
The base clock also sets the frequency of all other components of the computer like RAM, Cache, USB, PCIe bus, and every other component of the computer. eg., If the RAM works at 1066 MHz, the RAM multiplier frequency would be 10.66.
Clock Cycle
The time difference between two consecutive pulses in the CPU Clock is called a clock cycle. A computer with a speed of 1 GHz will have 1 billion cycles per second. Similarly, a computer with a CPU clock speed of 3.2 GHz will have 3.2 Billion cycles per second.
Real Time Clock
This system clock is not to be confused with the RTC (Real Time Clock) that is on every computer. The RTC is powered by a small CMOS (Complementary Metal Oxide Semiconductor) battery. The function of the RTC is to keep track of the calendar day, date, time, and year in real terms. The RTC stays working even when the computer is switched off using power from the CMOS battery.
Instruction Cycle
The instruction cycle is the sequence of steps executed by the computer CPU to execute one single instruction the instruction cycle consists of a sequence of the following steps
- Read the instruction from the memory.
- Decode the instruction.
- Find the address of the operand.
- Retrieve the operand from the memory location.
- Perform the desired operation on the operand.
- Find the address of the destination memory.
- Finally, store the result into the destination memory.
Machine Cycle
A computer program consists of several program statements or Instructions. During the program execution, the OS loads the program into the RAM. The CPU executes the program by fetching these instructions one by one.
However, each instruction may take several steps. instruction cycle is broken into several Machine Cycles.
The CPU repetitively performs a sequence of four steps
- Fetch an instruction.
- Decode the instruction.
- Execute the instruction.
- Store the results.
These four steps comprise a machine cycle.
Instruction Cycle vs Machine Cycle vs Clock Cycle
Clock Cycle The time difference between two consecutive pulses in the CPU Clock is called a clock cycle.
Machine Cycle The time taken for the CPU to complete a sequence of steps ie., fetch, decode, execute, and store the result, is called a machine cycle.
Instruction Cycle The time taken by the CPU to execute one program instruction is called an Instruction cycle.
As can be seen, the Instruction is larger and may take more than one machine cycle depending on the complexity of the instruction cycle. Some Instructions may be completed in one machine cycle. Similarly, each machine cycle may take several clock cycles depending on the complexity of the machine cycle. Also, some machine cycles may be completed in one clock cycle.
Video Explainer
For further clarity, you may like to see a video explaining the details HERE.
Conclusion
So, to wrap it up—each of these clocks plays its own role in keeping your computer running smoothly. The CPU clock handles processing speed, the system clock keeps everything in sync, and the real-time clock tracks time even when the system is off. They might sound similar, but they’re built for different jobs. Knowing the difference helps you better understand how your system works behind the scenes.
.