Full Details on Instruction Cycle or Fetch-Decode-Execute¶
Instruction Cycle â āĻŦāĻžāĻāϞāĻž āĻ English āĻāϞāĻžāĻĻāĻž āϏāĻāϏā§āĻāϰāĻŖ¶
āĻāĻŋāϤā§āϰ āϏāĻŽā§āĻĒāϰā§āĻā§ āύā§āĻ / Image note: Original article-āĻāϰ ⧍ā§ĢāĻāĻŋ educational image āĻŦāĻžāĻāϞāĻž āĻ āĻāĻļā§ āĻāĻŦāĻ āĻāĻāĻ ā§¨ā§ĢāĻāĻŋ image English āĻ āĻāĻļā§ lesson-āĻāϰ āϏāĻ āĻŋāĻ āĻāĻžā§āĻāĻžā§ āĻŦāϏāĻžāύ⧠āĻšā§ā§āĻā§āĨ¤ āĻā§āύ⧠image recreate āĻŦāĻž replace āĻāϰāĻž āĻšā§āύāĻŋāĨ¤ āĻļā§āϧ⧠ā§ŦāĻāĻŋ course/advertisement image āĻŦāĻžāĻĻ āĻĻā§āĻā§āĻž āĻšā§ā§āĻā§āĨ¤
āĻāĻ āύāĻĨāĻŋāϤ⧠āĻĻā§āĻ āĻāĻžāώāĻž āϏāĻŽā§āĻĒā§āϰā§āĻŖ āĻāϞāĻžāĻĻāĻž āĻ āĻāĻļā§ āϏāĻžāĻāĻžāύ⧠āĻšā§ā§āĻā§āĨ¤ āĻĒā§āϰāĻĨāĻŽā§ āϏāĻŽā§āĻĒā§āϰā§āĻŖ āĻŦāĻžāĻāϞāĻž āϏāĻāϏā§āĻāϰāĻŖ, āϤāĻžāϰāĻĒāϰ āϏāĻŽā§āĻĒā§āϰā§āĻŖ English version āĻĻā§āĻā§āĻž āĻšā§ā§āĻā§āĨ¤
āĻāύāϏā§āĻā§āϰāĻžāĻāĻļāύ āϏāĻžāĻāĻā§āϞ: āϏāĻŽā§āĻĒā§āϰā§āĻŖ āĻŦāĻžāĻāϞāĻž āϏāĻāϏā§āĻāϰāĻŖ¶
āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāϰ āĻ āϰā§āĻāĻžāύāĻžāĻāĻā§āĻļāύ āĻ āĻāϰā§āĻāĻŋāĻā§āĻāĻāĻžāϰ¶
āύā§āĻ: āĻāĻ āĻ āĻāĻļā§ āĻŦāĻžāĻāϞāĻž āĻŦā§āϝāĻžāĻā§āϝāĻž āϏāĻŽā§āĻĒā§āϰā§āĻŖ āĻāϞāĻžāĻĻāĻžāĻāĻžāĻŦā§ āĻĻā§āĻā§āĻž āĻšā§ā§āĻā§āĨ¤ CPU, ISA, Fetch, Decode, Execute, Opcode, Operand āĻāĻŦāĻ RTL-āĻāϰ āĻŽāϤ⧠āĻĒā§āϰā§ā§āĻāύā§ā§ technical term āĻāĻāϰā§āĻāĻŋāϤā§āĻ āϰāĻžāĻāĻž āĻšā§ā§āĻā§, āϝāĻžāϤ⧠āĻŦāĻŋāώā§āĻāĻŋāϤā§āϤāĻŋāĻ āĻ āϰā§āĻĨ āĻ āĻŋāĻ āĻĨāĻžāĻā§āĨ¤ āĻŽā§āϞ āĻļāĻŋāĻā§āώāĻžāĻŽā§āϞāĻ āĻŦāĻŋāώā§, āϧāĻžāĻĒ, āĻāĻĻāĻžāĻšāϰāĻŖ, equation āĻŦāĻž āĻĒā§āϰā§ā§āĻāύā§ā§ diagram āĻŦāĻžāĻĻ āĻĻā§āĻā§āĻž āĻšā§āύāĻŋāĨ¤
āϏā§āĻāĻŋāĻĒāϤā§āϰ¶
- Instruction Cycle āĻā§?
- āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāϰ āĻā§āĻāĻžāĻŦā§ Program Execute āĻāϰā§?
- Computer Program āĻā§?
- Program Instruction āĻā§?
- Central Processing Unit (CPU) āĻā§?
- CPU Instruction Set Architecture (ISA)
- Instruction Format āĻā§?
- Opcode āĻā§?
- Operand āĻā§?
- Addressing Mode āĻā§?
- Machine Cycle āĻā§?
- Instruction Cycle āĻ Clock Pulse
- CPU Clock Speed āĻ Instruction Cycle
- Pipelined Architecture
- Non-Pipelined Architecture
- FetchâDecodeâExecute Cycle: āϧāĻžāĻĒā§ āϧāĻžāĻĒā§
- Halt Phase āĻ Interrupt
Instruction Cycle āĻšāϞ⧠CPU-āĻāϰ āĻāĻāĻāĻŋ instruction āϏāĻŽā§āĻĒāύā§āύ āĻāϰāϤ⧠āĻĒā§āϰā§ā§āĻāύā§ā§ āϏāĻŽā§āĨ¤ āĻāĻāĻŋ CPU-āĻāϰ āĻāĻāĻāĻŋ āĻŽā§āϞāĻŋāĻ āĻāĻžāĻ āĻāĻŦāĻ āϏāĻžāϧāĻžāϰāĻŖāĻāĻžāĻŦā§ āϤāĻŋāύāĻāĻŋ āĻĒā§āϰāϧāĻžāύ āϧāĻžāĻĒā§ āĻŦā§āĻāĻžāύ⧠āĻšā§: Fetch, Decode āĻāĻŦāĻ ExecuteāĨ¤
āĻāĻāĻāĻŋ program-āĻāϰ instruction āϏāĻŽā§āĻĒāύā§āύ āĻāϰāĻžāϰ āĻāύā§āϝ CPU āĻŦāĻžāϰāĻŦāĻžāϰ FetchâDecodeâExecute Cycle āĻāĻžāϞāĻžā§āĨ¤ Machine Cycle āĻšāϞ⧠Instruction Cycle-āĻāϰ āĻāĻāĻāĻŋ āĻ āĻāĻļāĨ¤
āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāϰ āϏāĻŋāϏā§āĻā§āĻŽā§āϰ āĻĒā§āϰāϧāĻžāύ āĻāĻžāĻ āĻšāϞ⧠program execute āĻāϰāĻžāĨ¤ āĻāĻāĻāĻŋ computer program āĻ āύā§āĻāĻā§āϞ⧠instruction āύāĻŋā§ā§ āĻāĻ āĻŋāϤāĨ¤ āĻāϏāĻŦ instruction execute āĻāϰāĻžāϰ āĻĻāĻžā§āĻŋāϤā§āĻŦ Central Processing Unit (CPU)-āĻāϰāĨ¤
ā§§. Instruction Cycle āĻā§?¶
āĻāĻŋāϤā§āϰ ā§§: CPU Instruction Cycle-āĻāϰ āϏāĻžāĻŽāĻā§āϰāĻŋāĻ flowāĨ¤
Program-āĻāϰ instructionāĻā§āϞ⧠main memory āĻŦāĻž RAM-āĻ āϏāĻāϰāĻā§āώāĻŋāϤ āĻĨāĻžāĻā§āĨ¤ Computer memory āĻ āύā§āĻāĻā§āϞ⧠cell āĻĻāĻŋā§ā§ āϏāĻžāĻāĻžāύ⧠āĻĨāĻžāĻā§āĨ¤ āĻĒā§āϰāϤāĻŋāĻāĻŋ cell āĻŦāĻž location-āĻāϰ āĻāĻāĻāĻŋ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ memory address āĻĨāĻžāĻā§āĨ¤
Processor main memory āĻĨā§āĻā§ machine instruction āĻāĻāĻāĻŋ āĻāĻāĻāĻŋ āĻāϰ⧠āĻāύ⧠program execution āĻļā§āϰ⧠āĻāϰā§āĨ¤
CPU āĻŦāĻžāϰāĻŦāĻžāϰ āύāĻŋāĻā§āϰ āĻāĻžāϰāĻāĻŋ āĻāĻžāĻ āĻāϰ⧠instruction execute āĻāϰā§:
- Fetch â instruction āύāĻŋā§ā§ āĻāϏāĻž
- Decode â instruction-āĻāϰ āĻ āϰā§āĻĨ āĻŦā§āĻāĻž
- Execute â āύāĻŋāϰā§āϧāĻžāϰāĻŋāϤ āĻāĻžāĻ āĻāϰāĻž
- Store â āĻĢāϞāĻžāĻĢāϞ āϏāĻāϰāĻā§āώāĻŖ āĻāϰāĻž
Instruction Cycle-āĻāϰ āĻĒā§āϰāϤāĻŋāĻāĻŋ āĻ āĻāĻļ āϏāĻŽā§āĻĒāύā§āύ āĻāϰāϤ⧠āĻāĻ āĻŦāĻž āĻāĻāĻžāϧāĻŋāĻ Machine Cycle āϞāĻžāĻāϤ⧠āĻĒāĻžāϰā§āĨ¤
āĻā§āϰā§āϤā§āĻŦāĻĒā§āϰā§āĻŖ āĻĒāϰāĻŋāώā§āĻāĻžāϰ āϧāĻžāϰāĻŖāĻž: āĻŽā§āϞ āϞā§āĻāĻžā§ āĻĒā§āϰāĻĨāĻŽā§ āϤāĻŋāύāĻāĻŋ āĻŦā§ āϧāĻžāĻĒâFetch, Decode āĻ ExecuteâāĻŦāϞāĻž āĻšā§ā§āĻā§āĨ¤ āĻĒāϰ⧠Store-āĻā§ āĻāϤā§āϰā§āĻĨ operation āĻšāĻŋāϏā§āĻŦā§ āĻĻā§āĻāĻžāύ⧠āĻšā§ā§āĻā§āĨ¤ āĻĻā§āĻā§āĻ āĻāĻāĻ instruction execution process āĻŦā§āĻāĻžā§āĨ¤ āϤāĻŋāύ āϧāĻžāĻĒā§āϰ āĻŦā§āϝāĻžāĻā§āϝāĻžā§ result store āĻāϰāĻžāĻā§ Execute āϧāĻžāĻĒā§āϰ āĻ āĻāĻļ āĻšāĻŋāϏā§āĻŦā§ āϧāϰāĻž āĻšā§āĨ¤
⧍. āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāϰ āĻā§āĻāĻžāĻŦā§ Program Execute āĻāϰā§?¶
āĻāĻŋāϤā§āϰ ⧍: Program execution āĻāĻŦāĻ Instruction Cycle-āĻāϰ āϏāĻŽā§āĻĒāϰā§āĻāĨ¤
āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāϰ āĻā§āĻāĻžāĻŦā§ program execute āĻāϰ⧠āϤāĻž āĻŦā§āĻāϤ⧠āύāĻŋāĻā§āϰ āϏāĻŽā§āĻĒāϰā§āĻāĻŋāϤ āĻŦāĻŋāώā§āĻā§āϞ⧠āĻāĻā§ āĻāĻžāύāĻž āĻĻāϰāĻāĻžāϰ:
- Computer Program
- Program Instruction
- Central Processing Unit āĻŦāĻž CPU
- Instruction Set Architecture āĻŦāĻž ISA
- Instruction Format
- Opcode āĻ Operand
- Addressing Mode
- Machine Cycle
- CPU Clock Speed
- Instruction Cycle
āĻāĻ āĻŽā§āϞāĻŋāĻ āĻŦāĻŋāώā§āĻā§āϞ⧠āĻĨā§āĻā§ āĻŦā§āĻāĻž āϝāĻžā§, Control Unit āĻā§āĻāĻžāĻŦā§ instruction decode āĻāϰ⧠āĻāĻŦāĻ CPU āĻā§āĻāĻžāĻŦā§ āĻĒā§āϰ⧠Instruction Cycle āϏāĻŽā§āĻĒāύā§āύ āĻāϰā§āĨ¤
ā§Š. Computer Program āĻā§?¶
āĻāĻŋāϤā§āϰ ā§Š: Computer Program-āĻāϰ āĻŽā§āϞāĻŋāĻ āϧāĻžāϰāĻŖāĻžāĨ¤
āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāϰāĻā§ āĻĒā§āϰā§ā§āĻāύā§ā§ āĻāĻžāĻ āĻāϰāĻžāύā§āϰ āĻāύā§āϝ āĻāĻŋāĻā§ instruction āĻĻāĻŋāϤ⧠āĻšā§āĨ¤ āĻāĻŽā§āĻĒāĻŋāĻāĻāĻžāϰ āϝ⧠instructionāĻā§āϞ⧠āĻŦā§āĻāϤ⧠āĻāĻŦāĻ execute āĻāϰāϤ⧠āĻĒāĻžāϰā§, āϏā§āĻ instruction-āĻāϰ āϏāĻŽāώā§āĻāĻŋāĻā§ Computer Program āĻŦāϞāĻž āĻšā§āĨ¤
Computer Program āĻĒā§āϰāϤāĻŋāĻāĻŋ computer system-āĻāϰ āĻāĻāĻāĻŋ āĻĒā§āϰā§ā§āĻāύā§ā§ āĻ āĻāĻļāĨ¤ āĻā§ āϧāϰāύā§āϰ software āϤā§āϰāĻŋ āĻšāĻŦā§, āϤāĻžāϰ āĻāĻĒāϰ programming language āύāĻŋāϰā§āĻŦāĻžāĻāύ āĻāϰāĻž āĻšā§āĨ¤
Application software āϏāĻžāϧāĻžāϰāĻŖāϤ high-level programming language āĻĻāĻŋā§ā§ āϞā§āĻāĻž āĻšā§āĨ¤ āϝā§āĻŽāύ:
- C
- C++
- Java
- JavaScript
- Python
Program Compile āĻāϰāĻžāϰ āĻĒā§āϰāĻā§āϰāĻŋā§āĻž¶
āĻāĻŋāϤā§āϰ ā§Ē: High-level program āĻĨā§āĻā§ machine-readable code āϤā§āϰāĻŋāϰ āĻĒā§āϰāĻā§āϰāĻŋā§āĻžāĨ¤
High-level programming language-āĻ āϞā§āĻāĻž program-āĻā§ machine-readable binary format-āĻ āϰā§āĻĒāĻžāύā§āϤāϰ āĻāϰāϤ⧠āĻšā§āĨ¤
Machine code instruction āĻšāϞ⧠low-level binary instruction, āϝāĻž computer āϏāϰāĻžāϏāϰāĻŋ execute āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤
ā§Ē. Program Instruction āĻā§?¶
āĻāĻŋāϤā§āϰ ā§Ģ: Program statement āĻĨā§āĻā§ machine instructionāĨ¤
āĻāĻŋāϤā§āϰ ā§Ŧ: Program compilation-āĻāϰ āϏāĻŽā§āĻĒā§āϰā§āĻŖ flowāĨ¤
āĻāĻāĻāĻŋ computer program āĻ āύā§āĻāĻā§āϞ⧠program statement āύāĻŋā§ā§ āĻāĻ āĻŋāϤāĨ¤ āĻāĻā§āϞā§āĻā§ Program Instruction-āĻ āĻŦāϞāĻž āĻšā§āĨ¤ āĻĒā§āϰāϤāĻŋāĻāĻŋ instruction āĻāĻāĻāĻŋ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ āĻāĻžāĻ āĻāϰā§āĨ¤
Program instruction-āĻā§ binary machine instruction-āĻ āϰā§āĻĒāĻžāύā§āϤāϰ āĻāϰāĻž āĻšā§, āϝāĻžāϤ⧠CPU āϏāϰāĻžāϏāϰāĻŋ āϤāĻž execute āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤ Program execution āĻļā§āϰ⧠āĻāϰāĻžāϰ āĻāύā§āϝ Operating System āĻāĻ machine instructionāĻā§āϞ⧠main memory āĻŦāĻž RAM-āĻ load āĻāϰā§āĨ¤
CPU instructionāĻā§āϞ⧠āĻāĻāĻāĻŋ āĻāĻāĻāĻŋ āĻāϰ⧠fetch āĻāϰā§āĨ¤ āĻāϰāĻĒāϰ Control Unit instruction format āĻ āύā§āϝāĻžā§ā§ āĻĒā§āϰāϤāĻŋāĻāĻŋ machine instruction decode āĻāϰā§āĨ¤
Program-āĻāϰ logic āĻ algorithm āĻ āύā§āϝāĻžā§ā§ āĻŦāĻŋāĻāĻŋāύā§āύ āϧāϰāύā§āϰ instruction āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšā§āĨ¤ āϝā§āĻŽāύ:
- Input operation
- Output operation
- Arithmetic calculation
- Logical decision-making operation
Compilation-āĻāϰ āϏāĻŽā§ āĻĒā§āϰāϤāĻŋāĻāĻŋ program instruction binary machine instruction-āĻ āϰā§āĻĒāĻžāύā§āϤāϰāĻŋāϤ āĻšā§āĨ¤
Programming language-āĻāϰ āϧāϰāύ āĻ āύā§āϝāĻžā§ā§ compiler āĻĒā§āϰ⧠program-āĻā§ executable code-āĻ āϰā§āĻĒāĻžāύā§āϤāϰ āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤ āĻāĻ executable code āĻ āύā§āĻāĻā§āϞ⧠machine instruction āύāĻŋā§ā§ āĻāĻ āĻŋāϤāĨ¤ Interpreted language-āĻāϰ āĻā§āώā§āϤā§āϰ⧠conversion line by line āĻšā§āĨ¤
Executable code-āĻ binary machine instruction āĻĨāĻžāĻā§, āϝāĻž CPU āϏāϰāĻžāϏāϰāĻŋ decode āĻ execute āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤
ā§Ģ. Central Processing Unit (CPU) āĻā§?¶
āĻāĻŋāϤā§āϰ ā§: CPU āĻā§āĻāĻžāĻŦā§ program execute āĻāϰā§āĨ¤
āĻāĻŋāϤā§āϰ ā§Ž: CPU-āĻāϰ āĻĒā§āϰāϧāĻžāύ internal unitāĨ¤
Central Processing Unit (CPU) āĻšāϞ⧠computer system-āĻāϰ brain āĻŦāĻž āĻĒā§āϰāϧāĻžāύ processing unitāĨ¤ āĻāĻāĻŋ system-āĻā§ āĻāϏāϞ processing power āĻĻā§ā§āĨ¤
CPU-āĻāϰ āĻĒā§āϰāϧāĻžāύ āĻāĻžāĻ āĻšāϞā§:
- Computer program execute āĻāϰāĻž
- Computer system-āĻāϰ āϏāĻŦ operation āύāĻŋā§āύā§āϤā§āϰāĻŖ āĻāϰāĻž
CPU-āĻāϰ āĻā§āϤāϰ⧠āĻā§ā§āĻāĻāĻŋ unit āĻĨāĻžāĻā§ āĻāĻŦāĻ āĻĒā§āϰāϤāĻŋāĻāĻŋ unit āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ āĻāĻžāĻ āĻāϰā§āĨ¤ āĻā§āϰā§āϤā§āĻŦāĻĒā§āϰā§āĻŖ unitāĻā§āϞ⧠āĻšāϞā§:
- Memory Unit (MU)
- Arithmetic Logic Unit (ALU)
- Control Unit (CU)
CPU āĻŦāĻžāϰāĻŦāĻžāϰ Machine Cycle āĻāĻžāϞāĻŋā§ā§ program instruction execute āĻāϰā§āĨ¤
ā§Ŧ. CPU Instruction Set Architecture (ISA)¶
āĻāĻŋāϤā§āϰ ⧝: ISA-āĻāϰ basic position āĻāĻŦāĻ āĻāĻžāĻāĨ¤
āĻāĻŋāϤā§āϰ ā§§ā§Ļ: Microprocessor-āĻāϰ ISA āĻ instruction supportāĨ¤
āĻĒā§āϰāϤāĻŋāĻāĻŋ microprocessor chip āĻāĻŋāĻā§ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ binary command support āĻāϰā§, āϝā§āĻā§āϞ⧠CPU decode āĻ execute āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤
Processor chip āϤā§āϰāĻŋāϰ āϏāĻŽā§ āĻāĻ command set microprocessor-āĻāϰ circuit-āĻāϰ āĻŽāϧā§āϝ⧠hardwired āĻŦāĻž āϏā§āĻĨāĻžā§ā§āĻāĻžāĻŦā§ āϝā§āĻā§āϤ āĻāϰāĻž āĻšā§āĨ¤ CPU āϝ⧠command set support āĻāϰā§, āϤāĻžāĻā§ Instruction Set Architecture (ISA) āĻŦāϞāĻž āĻšā§āĨ¤
āĻŦāĻŋāĻāĻŋāύā§āύ processor-āĻāϰ ISA āĻāϞāĻžāĻĻāĻž āĻšāϤ⧠āĻĒāĻžāϰā§āĨ¤ āϤāĻžāĻ compiler āĻāĻāĻāĻŋ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ platform-āĻāϰ āĻāύā§āϝ program compile āĻāϰā§āĨ¤ Compiler āĻāĻŽāύ executable code āϤā§āϰāĻŋ āĻāϰā§, āϝāĻž āϏā§āĻ platform-āĻ execute āĻāϰāĻž āϝāĻžā§āĨ¤
ā§. Instruction Format āĻā§?¶
āĻāĻŋāϤā§āϰ ā§§ā§§: Addressing Mode, Opcode āĻ Operand fieldāĨ¤
āĻāĻāĻāĻŋ computer program-āĻ āĻ āύā§āĻ instruction āĻĨāĻžāĻā§, āϝāĻž CPU-āĻā§ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ operation āĻāϰāϤ⧠āύāĻŋāϰā§āĻĻā§āĻļ āĻĻā§ā§āĨ¤
āĻāĻāĻāĻŋ instruction execute āĻāϰāĻžāϰ āĻāύā§āϝ CPU-āĻā§ āĻāĻžāύāϤ⧠āĻšā§:
- āĻā§āύ operation āĻāϰāϤ⧠āĻšāĻŦā§
- āĻā§āύ data-āĻāϰ āĻāĻĒāϰ operation āĻāϰāϤ⧠āĻšāĻŦā§
- āϏā§āĻ data āĻā§āĻĨāĻžā§ āĻāĻā§
āĻāĻ āϤāĻĨā§āϝāĻā§āϞ⧠Instruction Format āĻĨā§āĻā§ āĻĒāĻžāĻā§āĻž āϝāĻžā§āĨ¤
CPU main memory āĻŦāĻž RAM āĻĨā§āĻā§ instruction āĻāĻāĻāĻŋ āĻāĻāĻāĻŋ āĻāϰ⧠fetch āĻāϰā§āĨ¤ āĻāϰāĻĒāϰ CPU-āĻāϰ Control Unit instruction decode āĻāϰā§āĨ¤
Control Unit instruction format āĻ āύā§āϝāĻžā§ā§ instruction decode āĻāϰā§āĨ¤ Instruction format āĻĨā§āĻā§ āĻāĻžāύāĻž āϝāĻžā§:
- āĻā§āύ operation āĻāϰāϤ⧠āĻšāĻŦā§ (Opcode)
- Operand-āĻāϰ effective address
- āϝ⧠data-āĻāϰ āĻāĻĒāϰ āĻāĻžāĻ āĻšāĻŦā§ (Operand)
Instruction Format āĻāĻāĻāĻŋ program instruction-āĻāϰ layout āĻ structure āύāĻŋāϰā§āϧāĻžāϰāĻŖ āĻāϰā§āĨ¤ āĻāϰ āĻĢāϞ⧠CPU instruction decode āĻāϰ⧠āĻĒā§āϰā§ā§āĻāύā§ā§ operation āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤
Instruction Format āĻĒā§āϰāϧāĻžāύāϤ āϤāĻŋāύāĻāĻŋ āĻ āĻāĻļ āύāĻŋā§ā§ āĻāĻ āĻŋāϤ:
- Addressing Mode
- Opcode
- Operand
Machine Instruction Format¶
| Part | Simple meaning in Bangla |
|---|---|
| Addressing Mode | Operand āĻŦāĻž data āĻā§āĻāĻžāĻŦā§ āĻĒāĻžāĻā§āĻž āϝāĻžāĻŦā§ |
| Opcode | CPU āĻā§āύ operation āĻāϰāĻŦā§ |
| Operand | āϝ⧠data-āĻāϰ āĻāĻĒāϰ operation āĻšāĻŦā§ āĻ āĻĨāĻŦāĻž āϤāĻžāϰ reference |
ā§Ž. Opcode āĻā§?¶
Microprocessor architecture-āĻ Opcode āĻšāϞ⧠machine instruction-āĻāϰ āϏā§āĻ āĻ āĻāĻļ, āϝāĻž CPU-āĻā§ āĻā§āύ operation āĻāϰāϤ⧠āĻšāĻŦā§ āϤāĻž āĻāĻžāύāĻžā§āĨ¤
Processor-āĻāϰ ISA āĻ āύā§āϝāĻžā§ā§ Opcode Control Unit-āĻā§ data āĻŦāĻž operand-āĻāϰ āĻāĻĒāϰ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ operation āĻāϰāϤ⧠āύāĻŋāϰā§āĻĻā§āĻļ āĻĻā§ā§āĨ¤
⧝. Operand āĻā§?¶
Microprocessor architecture-āĻ Operand āĻšāϞ⧠āϏā§āĻ data, āϝāĻžāϰ āĻāĻĒāϰ CPU āĻĒā§āϰā§ā§āĻāύā§ā§ operation āĻāϰā§āĨ¤
Machine instruction-āĻāϰ Operand field-āĻ āĻĨāĻžāĻāϤ⧠āĻĒāĻžāϰā§:
- āϏāϰāĻžāϏāϰāĻŋ actual data, āĻ āĻĨāĻŦāĻž
- Data-āĻāϰ reference, āϝā§āĻŽāύ actual data āϰāĻžāĻāĻž āĻāĻā§ āĻāĻŽāύ memory address
CPU Addressing Mode āĻ āύā§āϝāĻžā§ā§ Operand field-āĻāϰ āĻ āϰā§āĻĨ āĻŦā§āĻā§āĨ¤ āĻŦāĻŋāĻāĻŋāύā§āύ instruction format-āĻ āĻŦāĻŋāĻāĻŋāύā§āύ āϧāϰāύā§āϰ Addressing Mode āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšāϤ⧠āĻĒāĻžāϰā§āĨ¤
ā§§ā§Ļ. Addressing Mode āĻā§?¶
āĻāĻŋāϤā§āϰ ⧧⧍: Addressing Mode āĻā§āĻāĻžāĻŦā§ operand locate āĻāϰā§āĨ¤
Microprocessor architecture-āĻ Addressing Mode āĻšāϞ⧠machine instruction-āĻāϰ āϏā§āĻ āĻ āĻāĻļ, āϝāĻž CPU-āĻā§ Operand āĻā§āĻāĻžāĻŦā§ āĻŦā§āĻāϤ⧠āĻŦāĻž access āĻāϰāϤ⧠āĻšāĻŦā§ āϤāĻž āĻāĻžāύāĻžā§āĨ¤
āĻāĻāĻŋ āĻŦāϞ⧠āĻĻā§ā§ Operand-āĻāϰ āĻŽāϧā§āϝ⧠āϏāϰāĻžāϏāϰāĻŋ data āĻāĻā§, āύāĻžāĻāĻŋ data-āĻāϰ indirect reference āĻāĻā§āĨ¤
Operand bits āĻĻāĻŋā§ā§ āĻŦā§āĻāĻžāύ⧠āĻšāϤ⧠āĻĒāĻžāϰā§:
- āϏāϰāĻžāϏāϰāĻŋ āĻāĻāĻāĻŋ value
- Main memory-āĻāϰ āĻāĻāĻāĻŋ address
- CPU register-āĻāϰ number
Operand field-āĻ āĻā§āύ āϧāϰāύā§āϰ value āĻāĻā§, āϤāĻž Addressing Mode āĻāĻŋāĻšā§āύāĻŋāϤ āĻāϰā§āĨ¤
Indirect Addressing āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšāϞ⧠Operand-āĻ āĻāĻŽāύ āĻāĻāĻāĻŋ memory address āĻĨāĻžāĻā§, āϝāĻž actual data-āĻāϰ location āύāĻŋāϰā§āĻĻā§āĻļ āĻāϰā§āĨ¤
Instruction-āĻāϰ āϧāϰāύ āĻ āύā§āϝāĻžā§ā§ machine-code instruction format-āĻ āĻĻāĻļ āϧāϰāύā§āϰ Addressing Mode āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āϝā§āϤ⧠āĻĒāĻžāϰā§āĨ¤
ā§§ā§§. Machine Cycle āĻā§?¶
āĻāĻŋāϤā§āϰ ā§§ā§Š: Machine Cycle-āĻāϰ āĻĒā§āϰāϧāĻžāύ operationāĨ¤
āĻāĻŋāϤā§āϰ ā§§ā§Ē: Instruction Cycle, Machine Cycle āĻāĻŦāĻ clock state-āĻāϰ āϏāĻŽā§āĻĒāϰā§āĻāĨ¤
Operating System executable program code āĻāĻŦāĻ āϝ⧠data process āĻāϰāϤ⧠āĻšāĻŦā§ āϤāĻž main memory āĻŦāĻž RAM-āĻ load āĻāϰā§āĨ¤ āϤāĻāύ main memory-āϤ⧠program-āĻāϰ machine instruction āĻĨāĻžāĻā§āĨ¤
āĻāĻ machine instructionāĻā§āϞ⧠execute āĻāϰāĻžāϰ āĻĻāĻžā§āĻŋāϤā§āĻŦ CPU-āĻāϰāĨ¤ āϝā§āĻā§āύ⧠āĻāĻžāĻ āĻāϰāĻžāϰ āĻāύā§āϝ CPU āĻŦāĻžāϰāĻŦāĻžāϰ āĻāĻŋāĻā§ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ āϧāĻžāĻĒ āĻ āύā§āϏāϰāĻŖ āĻāϰā§āĨ¤ āĻāĻ āϧāĻžāĻĒāĻā§āϞā§āϰ āϧāĻžāϰāĻžāĻā§ Machine Cycle āĻŦāϞāĻž āĻšā§āĨ¤
Machine Cycle āĻšāϞ⧠Instruction Cycle-āĻāϰ āĻāĻāĻāĻŋ āĻ āĻāĻļāĨ¤ āĻāĻāĻāĻŋ instruction execute āĻāϰāϤ⧠CPU-āĻā§ āĻā§ā§āĻāĻāĻŋ Machine Cycle āĻāĻžāϞāĻžāϤ⧠āĻšāϤ⧠āĻĒāĻžāϰā§āĨ¤
Machine Cycle āĻšāϞ⧠microprocessor-āĻāϰ āĻā§āύ⧠āĻāĻžāĻ āϏāĻŽā§āĻĒāύā§āύ āĻāϰāĻžāϰ āĻŽā§āϞāĻŋāĻ operationāĨ¤ Instruction Cycle-āĻāϰ āĻĒā§āϰāϤāĻŋāĻāĻŋ āĻ āĻāĻļ āϏāĻŽā§āĻĒāύā§āύ āĻāϰāϤ⧠āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ āϏāĻāĻā§āϝāĻ Machine Cycle āϞāĻžāĻāϤ⧠āĻĒāĻžāϰā§āĨ¤
Program instruction āĻāĻāĻāĻŋ āĻāĻāĻāĻŋ āĻāϰ⧠execute āĻāϰāĻžāϰ āĻāύā§āϝ CPU āĻāĻā§āϰ āĻĒāϰ āĻāĻ Machine Cycle āĻāĻžāϞāĻžā§āĨ¤
Instruction Cycle-āĻāϰ āĻāĻžāϰāĻāĻŋ operation āĻšāϞā§:
- Fetch
- Decode
- Execute
- Store
Fetch, Decode, Execute āĻāĻŦāĻ Store operation āϏāĻŽā§āĻĒāύā§āύ āĻāϰāϤ⧠CPU āĻā§ā§āĻ round Machine Cycle āĻāĻžāϞāĻžā§āĨ¤
āϤāĻžāĻ āĻāĻāĻāĻŋ program instruction execute āĻāϰāϤ⧠āĻāĻ āĻŦāĻž āĻāĻāĻžāϧāĻŋāĻ Machine Cycle āϞāĻžāĻāϤ⧠āĻĒāĻžāϰā§āĨ¤ āĻāϤāĻā§āϞ⧠āϞāĻžāĻāĻŦā§ āϤāĻž instruction-āĻāϰ āϧāϰāύ āĻ CPU architecture-āĻāϰ āĻāĻĒāϰ āύāĻŋāϰā§āĻāϰ āĻāϰā§āĨ¤
āĻāĻĻāĻžāĻšāϰāĻŖ āĻšāĻŋāϏā§āĻŦā§, āĻāĻāĻ instruction execute āĻāϰāϤ⧠8085 āĻ 8086 processor-āĻāϰ āĻāĻŋāύā§āύ āϏāĻāĻā§āϝāĻ Machine Cycle āϞāĻžāĻāϤ⧠āĻĒāĻžāϰā§āĨ¤
⧧⧍. Instruction Cycle āĻ Clock Pulse¶
āĻāĻŋāϤā§āϰ ā§§ā§Ģ: Instruction format āϏāĻš Instruction CycleāĨ¤
āĻāĻŋāϤā§āϰ ā§§ā§Ŧ: Fetch, Decode āĻ Execute-āĻāϰ instruction flowāĨ¤
āϏāĻšāĻāĻāĻžāĻŦā§, CPU āĻāĻāĻāĻŋ machine instruction fetch āĻ execute āĻāϰāϤ⧠āϝ⧠āϏāĻŽā§ āύā§ā§, āϤāĻžāĻā§ Instruction Cycle āĻŦāϞāĻž āĻšā§āĨ¤
Computer program-āĻ āĻŦāĻŋāĻāĻŋāύā§āύ āϧāϰāύā§āϰ instruction āĻĨāĻžāĻā§āĨ¤ Instruction-āĻāϰ āĻāĻāĻŋāϞāϤāĻž āĻ āύā§āϝāĻžā§ā§ CPU-āĻāϰ āĻāĻāĻāĻŋ instruction execute āĻāϰāϤ⧠āĻāĻ āĻŦāĻž āĻāĻāĻžāϧāĻŋāĻ Machine Cycle āϞāĻžāĻāϤ⧠āĻĒāĻžāϰā§āĨ¤
āϤāĻžāĻ Machine Cycle āĻšāϞ⧠Instruction Cycle-āĻāϰ āĻ āĻāĻļāĨ¤ āϤāĻŦā§ computing-āĻāϰ āĻāϞā§āĻāύāĻžā§ CPU-āĻāϰ instruction execution mechanism āĻŦā§āĻāĻžāϤ⧠āĻāĻāύāĻ āĻāĻāύāĻ Machine Cycle āĻ Instruction CycleâāĻĻā§āĻ āĻļāĻŦā§āĻĻāĻ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āĻšā§āĨ¤
Processor āĻāĻāĻāĻŋ internal clock āĻĻā§āĻŦāĻžāϰāĻž āĻĒāϰāĻŋāĻāĻžāϞāĻŋāϤ āĻšā§āĨ¤ āĻāĻ clock āύāĻŋā§āĻŽāĻŋāϤ clock pulse āϤā§āϰāĻŋ āĻāϰā§āĨ¤ Analog clock signal-āĻā§ digital square-wave clock pulse-āĻ āϰā§āĻĒāĻžāύā§āϤāϰ āĻāϰāĻž āĻšā§āĨ¤
CPU-āĻā§ āĻāĻžāϞāĻžāύ⧠clock-āĻāϰ frequency-āĻā§ Processor Frequency āĻŦāϞāĻž āĻšā§āĨ¤ āϏāĻžāϧāĻžāϰāĻŖāĻāĻžāĻŦā§ frequency āĻŦā§āĻļāĻŋ āĻšāϞ⧠instruction āĻĻā§āϰā§āϤ process āĻāϰāĻž āϝāĻžā§āĨ¤
āĻĒā§āϰāϤāĻŋāĻāĻŋ clock cycle-āĻ CPU instruction execution-āĻāϰ āĻāĻāĻāĻŋ āĻ āĻāĻļ āϏāĻŽā§āĻĒāύā§āύ āĻāϰā§āĨ¤ āĻāĻ āĻ āĻāĻļāĻāĻŋ Fetch, Decode, Execute āĻ āĻĨāĻŦāĻž Store operation āĻšāϤ⧠āĻĒāĻžāϰā§āĨ¤
āĻĒā§āϰāϤāĻŋāĻāĻŋ program instruction āĻŦāĻŋāĻāĻŋāύā§āύ execution phase-āĻāϰ āĻŽāϧā§āϝ āĻĻāĻŋā§ā§ āϝāĻžā§āĨ¤ āϏāĻžāϧāĻžāϰāĻŖāĻāĻžāĻŦā§ CPU āĻāĻžāϰāĻāĻŋ clock cycle-āĻ āĻāĻāĻāĻŋ Instruction Cycle āϏāĻŽā§āĻĒāύā§āύ āĻāϰā§āĨ¤
āϤāĻŦā§ āύāĻŋāĻā§āϰ āĻŦāĻŋāώā§āĻā§āϞā§āϰ āĻāĻžāϰāĻŖā§ āĻāĻŋāĻā§ instruction execute āĻāϰāϤ⧠āĻŦā§āĻļāĻŋ clock tick āϞāĻžāĻāϤ⧠āĻĒāĻžāϰā§:
- Instruction-āĻāϰ āĻāĻāĻŋāϞāϤāĻž
- Instruction-āĻāϰ āϧāϰāύ
- Addressing Mode
ā§§ā§Š. CPU Clock Speed āĻ Instruction Cycle¶
āĻāĻŋāϤā§āϰ ā§§ā§: CPU clock pulse āĻ timing signalāĨ¤
āĻāĻŋāϤā§āϰ ā§§ā§Ž: Control Unit-āĻāϰ timing and control logicāĨ¤
āĻāĻŋāϤā§āϰ ⧧⧝: Clock cycle-āĻāϰ āϏāĻā§āĻā§ instruction step-āĻāϰ āϏāĻŽā§āĻĒāϰā§āĻāĨ¤
CPU-āĻāϰ internal clock āύāĻŋā§āĻŽāĻŋāϤ clock pulse āϤā§āϰāĻŋ āĻāϰā§āĨ¤ āĻĒā§āϰāϤāĻŋāĻāĻŋ clock pulse-āĻ CPU instruction execution-āĻāϰ āĻāĻāĻāĻŋ āĻ āĻāĻļ āĻāϰā§āĨ¤
āϤāĻžāĻ āϏāĻžāϧāĻžāϰāĻŖāĻāĻžāĻŦā§ clock speed āĻŦā§āĻļāĻŋ āĻšāϞ⧠CPU āĻĻā§āϰā§āϤ execute āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤ Clock speed Hertz (Hz)-āĻ āĻŽāĻžāĻĒāĻž āĻšā§āĨ¤ āĻāϧā§āύāĻŋāĻ CPU-āĻāϰ speed āϏāĻžāϧāĻžāϰāĻŖāϤ Gigahertz (GHz)-āĻ āĻĒā§āϰāĻāĻžāĻļ āĻāϰāĻž āĻšā§āĨ¤
Oscillator-āĻāϰ āĻĻā§āĻāĻŋ pulse-āĻāϰ āĻŽāĻžāĻā§āϰ āϏāĻŽā§āĻā§ Clock Cycle āĻŦāϞāĻž āĻšā§āĨ¤
āĻāĻ āϏā§āĻā§āύā§āĻĄā§ āĻŦā§āĻļāĻŋ clock pulse āĻšāϞ⧠processor āĻĻā§āϰā§āϤ āĻāĻžāĻ āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤ Clock speed-āĻāϰ āϏāĻžāϧāĻžāϰāĻŖ unit āĻšāϞā§:
- Megahertz āĻŦāĻž MHz
- Gigahertz āĻŦāĻž GHz
āĻāĻĻāĻžāĻšāϰāĻŖ āĻšāĻŋāϏā§āĻŦā§, 3 GHz clock-speed-āĻāϰ āĻāĻāĻāĻŋ processor āĻĒā§āϰāϤāĻŋ āϏā§āĻā§āύā§āĻĄā§:
āĻāĻŋ clock cycle āϏāĻŽā§āĻĒāύā§āύ āĻāϰā§āĨ¤
Processor-āĻāϰ speed āĻāϰāĻ āĻāĻŋāĻā§ āĻŦāĻŋāώā§ā§āϰ āĻāĻĒāϰāĻ āĻ āύā§āĻāĻāĻž āύāĻŋāϰā§āĻāϰ āĻāϰā§:
- Processor-āĻāϰ āϧāϰāύ
- Processor-āĻāϰ Microarchitecture
- āĻāĻāĻāĻŋ instruction āϏāĻŽā§āĻĒāύā§āύ āĻāϰāϤ⧠āĻĒā§āϰā§ā§āĻāύā§ā§ Clock Cycle-āĻāϰ āϏāĻāĻā§āϝāĻž
ā§§ā§Ē. Pipelined Architecture¶
āĻāĻŋāϤā§āϰ ⧍ā§Ļ: Overlap āĻāϰ⧠Pipeline Instruction ExecutionāĨ¤
āĻāĻŋāϤā§āϰ ⧍⧧: CPU Pipelined ArchitectureāĨ¤
Instruction Pipelining āĻā§?¶
Processor-āĻāϰ speed āĻŦāĻžā§āĻžāύā§āϰ āĻāύā§āϝ hardware industry āύāĻŋā§āĻŽāĻŋāϤ āύāϤā§āύ technology āϤā§āϰāĻŋ āĻāϰāĻā§āĨ¤ Computer development āĻļā§āϰ⧠āĻšāĻā§āĻžāϰ āĻĒāϰ āĻĨā§āĻā§ processor-āĻāϰ performance āĻ āύā§āĻ āĻāύā§āύāϤ āĻšā§ā§āĻā§āĨ¤
Pipelined Architecture āĻŦāĻž Instruction Pipelining CPU-āĻāϰ performance āĻ āύā§āĻ āĻŦāĻžā§āĻŋā§ā§āĻā§āĨ¤ āĻāĻāĻ āϏāĻāĻā§āϝāĻ Clock Cycle āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰ⧠CPU āĻŦā§āĻļāĻŋ instruction process āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤
CPU architecture āĻ āύā§āϝāĻžā§ā§ instruction processing āĻĻā§āĻāĻāĻžāĻŦā§ āĻšāϤ⧠āĻĒāĻžāϰā§:
- Pipelined Processing
- Non-Pipelined Processing
Instruction Pipelining-āĻāϰ āϧāĻžāϰāĻŖāĻžāĻā§ factory-āĻāϰ Assembly Line-āĻāϰ āϏāĻā§āĻā§ āϤā§āϞāύāĻž āĻāϰāĻž āϝāĻžā§āĨ¤
Assembly Line-āĻ production process-āĻā§ āĻā§ā§āĻāĻāĻŋ āĻāĻžāĻ āĻŦāĻž stage-āĻ āĻāĻžāĻ āĻāϰāĻž āĻšā§āĨ¤ āĻĢāϞ⧠āĻāĻāĻ āϏāĻŽā§ā§ āĻāϞāĻžāĻĻāĻž āĻāϞāĻžāĻĻāĻž āĻāĻžāĻ āĻāϰāĻž āϝāĻžā§ āĻāĻŦāĻ production rate āĻŦāĻžā§ā§āĨ¤
āĻāĻāĻāĻāĻžāĻŦā§, Pipelined Architecture-āĻ instruction execution-āĻā§ āĻā§ā§āĻāĻāĻŋ āύāĻŋāϰā§āĻĻāĻŋāώā§āĻ stage-āĻ āĻāĻžāĻ āĻāϰāĻž āĻšā§āĨ¤ āϝā§āĻŽāύ:
- Fetch
- Decode
- Execute
āĻĒā§āϰāϤāĻŋāĻāĻŋ Clock Cycle-āĻ CPU āĻāĻāĻāĻŋ instruction-āĻāϰ āĻāĻāĻāĻŋ stage āϏāĻŽā§āĻĒāύā§āύ āĻāϰā§āĨ¤
Pipeline Processing-āĻāϰ āĻŽāĻžāϧā§āϝāĻŽā§ CPU āĻāĻāĻ āϏāĻŽā§ā§ āĻā§ā§āĻāĻāĻŋ instruction-āĻāϰ āĻāϞāĻžāĻĻāĻž āĻ āĻāĻļ process āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤ āĻĢāϞ⧠program instructionāĻā§āϞ⧠āϤā§āϞāύāĻžāĻŽā§āϞāĻ āĻāĻŽ Clock Cycle-āĻ āϏāĻŽā§āĻĒāύā§āύ āĻāϰāĻž āϝāĻžā§āĨ¤
CPU parallelāĻāĻžāĻŦā§ āĻŦā§āĻļāĻŋ instruction process āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤ āĻ āύā§āϝāĻĻāĻŋāĻā§ Non-Pipelined CPU āĻāĻ āϏāĻŽā§ā§ āĻļā§āϧ⧠āĻāĻāĻāĻŋ instruction execute āĻāϰā§āĨ¤ āĻ āϧāĻŋāĻāĻžāĻāĻļ āĻāϧā§āύāĻŋāĻ processor Instruction Pipelining support āĻāϰā§āĨ¤
Instruction Pipelining-āĻ āĻĒā§āϰāϤāĻŋāĻāĻŋ Clock Cycle-āĻ CPU instruction-āĻāϰ āĻāĻāĻāĻŋ āĻ āĻāĻļ āϏāĻŽā§āĻĒāύā§āύ āĻāϰā§āĨ¤ āĻāĻāĻŋ Fetch, Decode āĻ āĻĨāĻŦāĻž Execute operation āĻšāϤ⧠āĻĒāĻžāϰā§āĨ¤
āĻŽā§āϞ āϞā§āĻāĻžāϰ āĻāĻĻāĻžāĻšāϰāĻŖ āĻ āύā§āϝāĻžā§ā§, āĻāĻāĻāĻŋ Machine Cycle round āϏāĻŽā§āĻĒāύā§āύ āĻāϰāϤ⧠āĻŦāĻžāϰā§āĻāĻŋ Clock Cycle āϞāĻžāĻā§āĨ¤ āĻāϰ instruction-āĻāϰ āĻāĻāĻŋāϞāϤāĻž āĻ āύā§āϝāĻžā§ā§ āĻāĻāĻāĻŋ Instruction Cycle-āĻāϰ āĻāύā§āϝ āĻāĻ āĻĨā§āĻā§ āĻāĻžāϰāĻāĻŋ Machine Cycle āϞāĻžāĻāϤ⧠āĻĒāĻžāϰā§āĨ¤
Pipelined Architecture āĻā§?¶
Pipelined Architecture-āĻ CPU āĻāĻāĻ āϏāĻŽā§ā§ āĻāĻāĻžāϧāĻŋāĻ instruction-āĻāϰ āĻŦāĻŋāĻāĻŋāύā§āύ āĻ āĻāĻļ process āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤
āĻĢāϞ⧠CPU instruction execution sequence āĻāϰāĻ āĻāĻžāϞā§āĻāĻžāĻŦā§ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāϤ⧠āĻĒāĻžāϰā§āĨ¤ āĻāĻāĻ āϏāĻāĻā§āϝāĻ instruction execute āĻāϰāϤ⧠āϤā§āϞāύāĻžāĻŽā§āϞāĻ āĻāĻŽ Clock Cycle āϞāĻžāĻā§āĨ¤
ā§§ā§Ģ. Non-Pipelined Architecture¶
āĻāĻŋāϤā§āϰ ⧍⧍: āĻāĻāĻāĻŋāϰ āĻĒāϰ āĻāĻāĻāĻŋ Non-Pipeline Instruction ExecutionāĨ¤
āĻāĻŋāϤā§āϰ ā§¨ā§Š: CPU Non-Pipelined ArchitectureāĨ¤
Non-Pipelined Architecture-āĻ CPU program instruction āĻāĻāĻāĻŋāϰ āĻĒāϰ āĻāĻāĻāĻŋ execute āĻāϰā§āĨ¤ āĻāĻāĻŋ āĻāĻāĻ āϏāĻŽā§ā§ āĻā§ā§āĻāĻāĻŋ instruction parallelāĻāĻžāĻŦā§ process āĻāϰāϤ⧠āĻĒāĻžāϰ⧠āύāĻžāĨ¤
āĻĢāϞ⧠Pipelined CPU-āĻāϰ āĻŽāϤ⧠instruction execution sequence āĻāĻžāϞā§āĻāĻžāĻŦā§ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰāĻž āϏāĻŽā§āĻāĻŦ āĻšā§ āύāĻžāĨ¤
āϤāĻžāĻ āĻāĻāĻ āϏāĻāĻā§āϝāĻ instruction execute āĻāϰāϤ⧠Pipelined Architecture-āĻāϰ āϤā§āϞāύāĻžā§ Non-Pipelined Architecture-āĻ āĻŦā§āĻļāĻŋ Clock Cycle āϞāĻžāĻā§āĨ¤
ā§§ā§Ŧ. FetchâDecodeâExecute Cycle: āϧāĻžāĻĒā§ āϧāĻžāĻĒā§¶
āĻāĻŋāϤā§āϰ ⧍ā§Ē: FetchâDecodeâExecute-āĻāϰ āϏāĻŽā§āĻĒā§āϰā§āĻŖ CPU flowāĨ¤
CPU āϝ⧠āĻĒā§āϰāϤāĻŋāĻāĻŋ instruction execute āĻāϰā§, āϤāĻž āĻŦāĻŋāĻāĻŋāύā§āύ Clock Cycle-āĻ āĻŦāĻŋāĻāĻŋāύā§āύ phase-āĻāϰ āĻŽāϧā§āϝ āĻĻāĻŋā§ā§ āϝāĻžā§āĨ¤
Instruction Cycle-āĻāϰ āϧāĻžāĻĒāĻā§āϞ⧠āĻāĻžāϞā§āĻāĻžāĻŦā§ āĻŦā§āĻāĻžāϰ āĻāύā§āϝ CPU-āĻāϰ āĻļā§āϰ⧠āĻāϰāĻž operationāĻā§āϞ⧠āϧāĻžāϰāĻžāĻŦāĻžāĻšāĻŋāĻāĻāĻžāĻŦā§ āĻĻā§āĻāĻž āϝāĻžā§āĨ¤
āϧāĻžāĻĒ ā§§: Instruction Cycle āĻļā§āϰ⧶
Instruction Cycle-āĻāϰ āĻĒā§āϰāĻĨāĻŽ phase āĻšāϞ⧠Fetch PhaseāĨ¤ āĻļā§āϰā§āϤ⧠Sequence Counter āĻŦāĻž SC-āĻāϰ āĻŽāĻžāύ zero āĻāϰāĻž āĻšā§āĨ¤
āϧāĻžāĻĒ ā§¨: Clock Pulse \(T_0\)-āϤ⧠Fetch Phase¶
Program Counter āĻŦāĻž PC register-āĻ āĻĒāϰāĻŦāϰā§āϤ⧠instruction-āĻāϰ address āĻĨāĻžāĻā§āĨ¤
āĻĒā§āϰāĻĨāĻŽ Clock Cycle \(T_0\)-āϤ⧠PC-āϤ⧠āĻĨāĻžāĻāĻž address Address Register āĻŦāĻž AR-āĻ āĻĒāĻžāĻ āĻžāύ⧠āĻšā§āĨ¤
āϧāĻžāĻĒ ā§Š: Clock Pulse \(T_1\)-āϤ⧠Fetch Phase¶
āĻāĻŋāϤā§āϰ ⧍ā§Ģ: \(I\) bit, Opcode āĻāĻŦāĻ Address field-āϏāĻš 16-bit instructionāĨ¤
āĻĒāϰā§āϰ Clock Cycle \(T_1\)-āϤ⧠memory āĻĨā§āĻā§ instruction fetch āĻāϰ⧠Instruction Register āĻŦāĻž IR-āĻ āϰāĻžāĻāĻž āĻšā§āĨ¤
āĻāĻāĻ āϏāĻŽā§ā§ Program Counter āĻŦāĻž PC-āĻāϰ āĻŽāĻžāύ āĻāĻ āĻŦāĻžā§āĻžāύ⧠āĻšā§āĨ¤
āĻāĻāύ PC āĻĒāϰāĻŦāϰā§āϤ⧠āϝ⧠instruction fetch āĻāϰāĻž āĻšāĻŦā§, āϤāĻžāϰ memory location āύāĻŋāϰā§āĻĻā§āĻļ āĻāϰā§āĨ¤
Instruction Register āĻŦāĻž IR āĻāĻāĻāĻŋ 16-bit register āĻāĻŦāĻ āĻāĻāĻŋ 16-bit instruction format support āĻāϰā§āĨ¤
| Bit position | Field | āϏāĻšāĻ āĻŦāĻžāĻāϞāĻž |
|---|---|---|
| Bit 15 | Addressing Mode or \(I\) bit | Direct āύāĻž Indirect mode āϤāĻž āĻāĻžāύāĻžā§ |
| Bits 12â14 | Opcode | āĻā§āύ operation āĻšāĻŦā§ āϤāĻž āĻāĻžāύāĻžā§ |
| Bits 0â11 | Operand Address | Operand-āĻāϰ address āĻĻā§ā§ |
āϧāĻžāĻĒ ā§Ē: Clock Pulse \(T_2\)-āϤ⧠Decode Phase¶
Instruction Cycle-āĻāϰ āĻĻā§āĻŦāĻŋāϤā§ā§ āĻĒā§āϰāϧāĻžāύ phase āĻšāϞ⧠Decode PhaseāĨ¤
Instruction fetch āĻāϰ⧠Instruction Register āĻŦāĻž IR-āĻ āϰāĻžāĻāĻžāϰ āĻĒāϰ CPU-āĻāϰ Control Unit āϏā§āĻāĻŋ decode āĻāϰā§āĨ¤
Bits 12, 13 āĻ 14-āĻ āĻĨāĻžāĻāĻž Opcode āĻ āύā§āϝāĻžā§ā§ Control Unit instruction decode āĻāϰā§āĨ¤
āϧāĻžāĻĒ ā§Ģ: Clock Pulse \(T_2\)-āϤ⧠Instruction Type Decode āĻāϰāĻž¶
Control Unit āĻĒā§āϰāĻĨāĻŽā§ instruction-āĻāϰ āϧāϰāύ āύāĻŋāϰā§āϧāĻžāϰāĻŖ āĻāϰā§āĨ¤ āϤāĻŋāύ āϧāϰāύā§āϰ instruction āĻšāϤ⧠āĻĒāĻžāϰā§:
- Memory-Reference Instruction
- Register-Reference Instruction
- Input/Output Instruction
Instruction-āĻāϰ āϧāϰāύ 3-to-8 Decoder āĻĻāĻŋā§ā§ decode āĻāϰāĻž āĻšā§āĨ¤ \(D_7\)-āĻāϰ value āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻāϰ⧠instruction-āĻāϰ āϧāϰāύ āύāĻŋāϰā§āϧāĻžāϰāĻŖ āĻāϰāĻž āĻšā§āĨ¤
Three-bit Opcode āĻĻāĻŋā§ā§ āĻāĻāĻāĻŋ value āĻĻā§āĻāĻžāύ⧠āϝāĻžā§:
āĻ āϰā§āĻĨāĻžā§ binary Opcode-āĻāϰ range:
āĻĨā§āĻā§
āϧāĻžāĻĒ ā§Ŧ: Clock Pulse \(T_3\)-āϤ⧠Addressing Mode Decode āĻāϰāĻž¶
\(D_7 = 0\) āĻšāϞ⧠instruction-āĻāϰ āϧāϰāύ Memory-Reference InstructionāĨ¤
\(D_7 = 1\) āĻšāϞ⧠instruction āĻšāϤ⧠āĻĒāĻžāϰā§:
- Register-Reference Instruction, āĻ āĻĨāĻŦāĻž
- Input/Output Instruction
āĻāϰāĻĒāϰ \(I\) bit āĻĒāϰā§āĻā§āώāĻž āĻāϰāĻž āĻšā§:
- \(D_7 = 1\) āĻāĻŦāĻ \(I = 0\) āĻšāϞ⧠āĻāĻāĻŋ Register-Reference InstructionāĨ¤
- \(D_7 = 1\) āĻāĻŦāĻ \(I = 1\) āĻšāϞ⧠āĻāĻāĻŋ Input/Output InstructionāĨ¤
Bit 15-āĻ āĻĨāĻžāĻāĻž \(I\) bit-āĻāϰ value āĻ āύā§āϝāĻžā§ā§ instruction-āĻāϰ āϧāϰāύ āĻ āĻĒā§āϰā§ā§āĻāύā§ā§ decision āύā§āĻā§āĻžāϰ āĻĒāϰ Decode Phase āĻļā§āώ āĻšā§āĨ¤
Memory-Reference Instruction-āĻāϰ āĻā§āώā§āϤā§āϰ⧠Decode operation Addressing Mode-āĻ āύāĻŋāϰā§āϧāĻžāϰāĻŖ āĻāϰā§āĨ¤
Bit 15-āĻ āĻĨāĻžāĻāĻž \(I\) bit-āĻāϰ value āĻ āύā§āϝāĻžā§ā§ Addressing Mode āύāĻŋāϰā§āϧāĻžāϰāĻŋāϤ āĻšā§:
- \(I = 0\) āĻšāϞ⧠Direct Addressing
- \(I = 1\) āĻšāϞ⧠Indirect Addressing
āĻāϰāĻĒāϰ Decode Phase āĻļā§āώ āĻšā§ āĻāĻŦāĻ Execution Phase āĻļā§āϰ⧠āĻšā§āĨ¤
āϧāĻžāĻĒ ā§: Clock Pulse \(T_4\)-āϤ⧠Execution Phase¶
Decode Phase āĻļā§āώ āĻšāϞ⧠Execution Phase āĻļā§āϰ⧠āĻšā§āĨ¤ āĻāĻ phase-āĻ processor Accumulator Register-āĻ āĻĨāĻžāĻāĻž data āĻŦāĻž Operand-āĻāϰ āĻāĻĒāϰ āĻĒā§āϰā§ā§āĻāύā§ā§ operation āĻāϰā§āĨ¤
Register-Reference Instruction¶
Register-Reference Instruction-āĻāϰ execution āϏāϰāĻžāϏāϰāĻŋ āĻšā§āĨ¤ Processor āĻĒā§āϰā§ā§āĻāύā§ā§ operation āĻāϰ⧠āĻāĻŦāĻ Sequence Counter āĻŦāĻž SC āĻāĻŦāĻžāϰ zero āĻāϰāĻž āĻšā§āĨ¤
Input/Output Instruction¶
Input/Output Instruction-āĻāϰ āĻā§āώā§āϤā§āϰ⧠processor āĻĒā§āϰā§ā§āĻāύā§ā§ I/O operation āĻāϰ⧠āĻāĻŦāĻ Sequence Counter āĻāĻŦāĻžāϰ zero āĻāϰāĻž āĻšā§āĨ¤
Memory-Reference Instruction¶
Memory-Reference Instruction-āĻāϰ āĻā§āώā§āϤā§āϰ⧠bit 15 āĻĨā§āĻā§ āĻŦā§āĻāĻž āϝāĻžā§ Direct āύāĻž Indirect Addressing āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻšāĻŦā§āĨ¤
Direct Memory Reference: \(I = 0\)¶
Direct Addressing-āĻ processor bits 0â11 āĻĻāĻŋā§ā§ āĻĻā§āĻāĻžāύ⧠address āĻĨā§āĻā§ data fetch āĻāϰ⧠āϤāĻžāϰ āĻāĻĒāϰ āĻĒā§āϰā§ā§āĻāύā§ā§ operation āĻāĻžāϞāĻžā§āĨ¤ āĻāϰāĻĒāϰ Sequence Counter zero āĻāϰāĻž āĻšā§āĨ¤
Indirect Memory Reference: \(I = 1\)¶
Indirect Addressing-āĻ processor āĻĒā§āϰāĻĨāĻŽā§ Effective Address āĻŦā§āϰ āĻāϰā§āĨ¤ āĻāϰāĻĒāϰ āϏā§āĻ Effective Address āĻĨā§āĻā§ data fetch āĻāϰ⧠āĻĒā§āϰā§ā§āĻāύā§ā§ operation āĻāĻžāϞāĻžā§āĨ¤ Bits 0â11 Effective Address-āĻāϰ āĻĻāĻŋāĻā§ āύāĻŋāϰā§āĻĻā§āĻļ āĻāϰā§āĨ¤ āϏāĻŦāĻļā§āώ⧠Sequence Counter zero āĻāϰāĻž āĻšā§āĨ¤
ā§§ā§. Halt Phase āĻ Interrupt¶
Execution Phase āϏāĻŽā§āĻĒāύā§āύ āĻšāϞ⧠control āĻāĻŦāĻžāϰ Fetch Phase-āĻ āĻĢāĻŋāϰ⧠āϝāĻžā§ āĻāĻŦāĻ āύāϤā§āύ Instruction Cycle āĻļā§āϰ⧠āĻšā§āĨ¤
Execution-āĻāϰ āĻĒāϰ⧠interrupt-āĻāϰ āĻāĻžāϰāĻŖā§ halt signal āĻāϞ⧠Instruction Cycle Halt Phase-āĻ āϝā§āϤ⧠āĻĒāĻžāϰā§āĨ¤
Processor interrupt handle āĻāϰāĻžāϰ āĻĒāϰ āĻāĻŦāĻžāϰ Instruction Cycle execution āĻļā§āϰ⧠āĻāϰā§āĨ¤
āĻāĻ āύāĻāϰ⧠āϏāĻŽā§āĻĒā§āϰā§āĻŖ Flow¶
Program written in a high-level language
â
Compilation or interpretation
â
Binary machine instructions
â
Operating System loads instructions into RAM
â
PC points to the next instruction
â
Fetch â Decode â Execute â Store
â
SC returns to 0 and the next cycle begins
â
If an interrupt occurs: Halt/Handle Interrupt â Resume
āϏāĻšāĻ āĻŦāĻžāĻāϞāĻžā§:
High-level language-āĻ Program āϞā§āĻāĻž
â
Compile āĻ
āĻĨāĻŦāĻž Interpret āĻāϰāĻž
â
Binary Machine Instruction āϤā§āϰāĻŋ
â
Operating System instructionāĻā§āϞ⧠RAM-āĻ load āĻāϰā§
â
PC āĻĒāϰāĻŦāϰā§āϤ⧠instruction-āĻāϰ address āϧāϰ⧠āϰāĻžāĻā§
â
Fetch â Decode â Execute â Store
â
SC āĻāĻŦāĻžāϰ 0 āĻšā§ āĻāĻŦāĻ āĻĒāϰāĻŦāϰā§āϤ⧠cycle āĻļā§āϰ⧠āĻšā§
â
Interrupt āĻāϞā§: Halt/Interrupt Handle â āĻāĻŦāĻžāϰ Resume
āĻā§ āĻĒāϰāĻŋāώā§āĻāĻžāϰ āĻāϰāĻž āĻšā§ā§āĻā§¶
Supplied Markdown āĻĨā§āĻā§ āύāĻŋāĻā§āϰ non-lesson āĻŦāĻŋāώā§āĻā§āϞ⧠āĻŦāĻžāĻĻ āĻĻā§āĻā§āĻž āĻšā§ā§āĻā§:
- Udemy āĻ online course-āĻāϰ advertisement
- âJoin the Best Sellerâ promotional section
- Course promotion-āĻāϰ description
- Advertisement image āĻ referral link
- âRead Moreâ āĻ âScroll back to topâ navigation link
- āĻāĻžāϞāĻŋ āĻŦāĻž āĻŦāĻžāϰāĻŦāĻžāϰ āĻāϏāĻž âInstruction Cycleâ heading
Original article-āĻāϰ ⧍ā§ĢāĻāĻŋ educational image-āĻāϰ āϏāĻŦāĻā§āϞā§āĻ āĻŦāĻžāĻāϞāĻž āĻ EnglishâāĻĻā§āĻ āĻ āĻāĻļā§ āϰāĻžāĻāĻž āĻšā§ā§āĻā§āĨ¤ āĻā§āύ⧠educational image recreate, replace āĻŦāĻž skip āĻāϰāĻž āĻšā§āύāĻŋāĨ¤ āĻļā§āϧ⧠article-āĻāϰ ā§ŦāĻāĻŋ course/advertisement image āĻŦāĻžāĻĻ āĻĻā§āĻā§āĻž āĻšā§ā§āĻā§āĨ¤
āϏāĻŦ definition, explanation, example, numerical fact, instruction field, register-transfer statement, clock timing, execution decision āĻāĻŦāĻ interrupt-āϏāĻŽā§āĻĒāϰā§āĻāĻŋāϤ āĻļāĻŋāĻā§āώāĻžāĻŽā§āϞāĻ content āϰāĻžāĻāĻž āĻšā§ā§āĻā§āĨ¤
Instruction Cycle: Complete English Version¶
Computer Organization and Architecture¶
Note: This section contains the complete English version. All educational points, steps, examples, equations, register-transfer statements, timing details, and necessary diagrams have been retained. Advertisements, promotional material, unrelated links, and unnecessary duplicate images remain excluded.
Table of Contents¶
- What Is an Instruction Cycle?
- How Does a Computer Execute a Program?
- What Is a Computer Program?
- What Is a Program Instruction?
- What Is the Central Processing Unit?
- CPU Instruction Set Architecture (ISA)
- What Is an Instruction Format?
- What Is an Opcode?
- What Is an Operand?
- What Is an Addressing Mode?
- What Is a Machine Cycle?
- Instruction Cycle and Clock Pulses
- CPU Clock Speed and Instruction Cycle
- Pipelined Architecture
- Non-Pipelined Architecture
- FetchâDecodeâExecute Cycle: Step by Step
- Halt Phase and Interrupt
The instruction cycle is the time required by the CPU to execute one single instruction. It is a basic operation of the CPU and is commonly explained through three main steps: Fetch, Decode, and Execute.
The CPU repeatedly performs the FetchâDecodeâExecute Cycle to execute the instructions of a program. A machine cycle is a part of the instruction cycle.
The main function of a computer system is to execute programs. A computer program consists of a set of instructions. The Central Processing Unit (CPU) is responsible for executing these program instructions.
1. What Is an Instruction Cycle?¶
Figure 1: Overall flow of the CPU Instruction Cycle.
The program instructions are stored in the main memory or RAM. Computer memory is organized into many cells, and every cell or location has a specific memory address.
The processor starts program execution by fetching the machine instructions one by one from the main memory.
The CPU executes the instructions by repeatedly performing four operations:
- Fetch
- Decode
- Execute
- Store
Each part of the instruction cycle may require a number of machine cycles to complete.
Important clarification: The source first describes the cycle with three broad stagesâFetch, Decode, and Executeâand later describes Store as a fourth operation. Both descriptions refer to the same instruction-execution process; in the three-stage description, storing the result is treated as part of execution.
2. How Does a Computer Execute a Program?¶
Figure 2: Relationship between program execution and the Instruction Cycle.
To understand how a computer executes a program, we need to understand several related ideas:
- Computer program
- Program instruction
- Central Processing Unit or CPU
- Instruction Set Architecture or ISA
- Instruction format
- Opcode and operand
- Addressing mode
- Machine cycle
- CPU clock speed
- Instruction cycle
These basic ideas explain how the Control Unit decodes an instruction and how the CPU completes the instruction cycle.
3. What Is a Computer Program?¶
Figure 3: Basic concept of a Computer Program.
A computer system needs a set of instructions that directs it to perform the desired operations. A set of instructions that a computer can interpret and execute is called a computer program.
A computer program is an essential part of every computer system. The programming language is selected according to the type of software being developed.
Application software is generally written using high-level programming languages. Common examples include:
- C
- C++
- Java
- JavaScript
- Python
Program Compilation¶
Figure 4: Conversion of a high-level program into machine-readable code.
A program written in a high-level programming language must be converted into a machine-readable binary format.
Machine-code instructions are low-level binary instructions that can be executed directly by the computer.
4. What Is a Program Instruction?¶
Figure 5: Conversion of program statements into machine instructions.
Figure 6: Complete program-compilation flow.
A computer program consists of a set of program statements, also called program instructions. Each instruction performs a specific task.
Program instructions are converted into binary machine instructions that the CPU can directly execute. The operating system loads these machine instructions into the main memory or RAM to start program execution.
The CPU fetches the instructions one by one. The Control Unit decodes each machine instruction according to its instruction format.
A program uses different types of instructions according to its logic and algorithm. For example, an instruction may perform:
- Input operation
- Output operation
- Arithmetic calculation
- Logical decision-making operation
During compilation, every program instruction is converted into a binary machine instruction.
Depending on the programming language, a compiler may convert the complete program into executable code, which is a set of machine instructions. In an interpreted language, the conversion takes place line by line.
The executable code contains binary machine instructions that the CPU can directly decode and execute.
5. What Is the Central Processing Unit?¶
Figure 7: How the CPU executes a program.
Figure 8: Major internal units of the CPU.
The Central Processing Unit (CPU) is the brain and processing engine of a computer system. It provides the actual processing power of the system.
The main functions of the CPU are:
- Executing computer programs
- Controlling all operations performed by the computer system
The CPU internally consists of several units. Each unit performs a specific task. Important internal units include:
- Memory Unit (MU)
- Arithmetic Logic Unit (ALU)
- Control Unit (CU)
The CPU executes program instructions by repeatedly performing the machine cycle.
6. CPU Instruction Set Architecture (ISA)¶
Figure 9: Basic position and function of the ISA.
Figure 10: The microprocessor ISA and supported instructions.
Every microprocessor chip implements and supports a set of binary commands that it can decode and execute.
During processor-chip manufacturing, this set of commands is built or hardwired into the microprocessor circuitry. The command set implemented by a CPU is called its Instruction Set Architecture (ISA).
Because different processors may use different ISAs, a compiler compiles a program for a specific platform. It generates executable code that can run on that platform.
7. What Is an Instruction Format?¶
Figure 11: Addressing Mode, Opcode, and Operand fields.
A computer program contains many instructions that direct the CPU to perform specific operations.
To execute an instruction, the CPU needs to know:
- Which operation must be performed
- On which data the operation must be performed
- Where that data is located
This information is provided by the instruction format.
The CPU fetches instructions one by one from the main memory or RAM. Its Control Unit then decodes each instruction.
The Control Unit decodes an instruction according to its format. The format provides:
- The operation to perform (Opcode)
- The effective address of the operand
- The data on which the operation will be performed (Operand)
The instruction format defines the layout and structure of a program instruction so the CPU can decode it and perform the desired operation.
An instruction format mainly contains three parts:
- Addressing Mode
- Opcode
- Operand
Machine Instruction Format¶
| Part | Simple meaning |
|---|---|
| Addressing Mode | How the operand or data will be obtained |
| Opcode | Which operation the CPU will perform |
| Operand | The data on which the operation will be performed, or its reference |
8. What Is an Opcode?¶
In microprocessor architecture, the Opcode is the part of a machine instruction that specifies which operation the CPU must perform.
The Opcode directs the CPU's Control Unit to perform an operation on the data or operand according to the processor's ISA.
9. What Is an Operand?¶
In microprocessor architecture, an Operand is the data on which the CPU performs the desired operation.
The Operand field of a machine instruction may specify:
- The actual data itself, or
- A reference to the data, such as a memory address containing the actual data
The CPU interprets the Operand field according to the addressing mode. Different instruction formats may use different addressing modes.
10. What Is an Addressing Mode?¶
Figure 12: How the Addressing Mode locates an operand.
In microprocessor architecture, the Addressing Mode is the part of a machine instruction that tells the CPU how to interpret or access the Operand.
It specifies whether the Operand contains direct data or an indirect reference to the data.
The Operand bits may represent:
- A direct value
- A main-memory address
- A CPU register number
The Addressing Mode identifies which type of value is present in the Operand field.
If indirect addressing is selected, the Operand contains a memory address that points to the actual data.
Machine-code instruction formats can use ten different types of addressing modes, depending on the type of instruction.
11. What Is a Machine Cycle?¶
Figure 13: Major operations of a Machine Cycle.
Figure 14: Relationship among an Instruction Cycle, Machine Cycles, and clock states.
The Operating System loads the executable program code and the data to be processed into the main memory or RAM. The main memory then contains the program's machine instructions.
The CPU is responsible for executing these machine instructions. To perform any task, it repeatedly follows a sequence of steps. This sequence is called a Machine Cycle.
A Machine Cycle is part of an Instruction Cycle. The CPU may perform several machine cycles to execute one instruction.
The Machine Cycle is the basic operation used by a microprocessor to perform an activity. A specific number of machine cycles may be required to complete each part of the Instruction Cycle.
The CPU continuously performs machine cycles to execute program instructions one by one.
The Instruction Cycle contains four operations:
- Fetch
- Decode
- Execute
- Store
The CPU performs a number of Machine Cycle rounds to complete these Fetch, Decode, Execute, and Store operations.
Therefore, one program instruction may need one or more Machine Cycles. The required number depends on the instruction type and CPU architecture.
For example, the 8085 and 8086 processors require different numbers of Machine Cycles to execute the same instruction.
12. Instruction Cycle and Clock Pulses¶
Figure 15: Instruction Cycle with the instruction format.
Figure 16: Instruction flow through Fetch, Decode, and Execute.
In simple words, the Instruction Cycle is the time taken by the CPU to fetch and execute one machine instruction.
A computer program contains different types of instructions. According to the complexity of an instruction, the CPU may need one or more Machine Cycles to execute it.
Therefore, a Machine Cycle is a part of an Instruction Cycle. However, in computing discussions, the terms Machine Cycle and Instruction Cycle are sometimes both used while explaining the CPU's instruction-execution mechanism.
The processor is driven by an internal clock. This clock produces a steady stream of clock pulses. The analog clock signal is converted into a digital square-wave clock pulse.
The frequency of the clock that drives the CPU is called the processor frequency. Generally, a higher frequency allows instructions to be processed faster.
During each clock cycle, the CPU completes a part of the instruction-execution process. That part may be a Fetch, Decode, Execute, or Store operation.
Every program instruction passes through different execution phases. The CPU commonly completes one Instruction Cycle in four clock cycles.
However, some instructions may take more clock ticks depending on:
- Instruction complexity
- Instruction type
- Addressing mode
13. CPU Clock Speed and Instruction Cycle¶
Figure 17: CPU clock pulses and timing signals.
Figure 18: Timing and control logic of the Control Unit.
Figure 19: Relationship between clock cycles and instruction steps.
The CPU's internal clock produces a steady stream of clock pulses. For each clock pulse, the CPU performs a part of instruction execution.
Therefore, a faster clock speed generally provides a faster CPU execution speed. Clock speed is measured in Hertz (Hz). Modern CPU speeds are commonly expressed in Gigahertz (GHz).
A clock cycle is the time between two pulses of an oscillator.
A processor can work faster when it receives more clock pulses per second. Common clock-speed units are:
- Megahertz or MHz
- Gigahertz or GHz
For example, a processor with a clock speed of 3 GHz performs:
clock cycles per second.
Processor speed also depends greatly on other factors, including:
- Processor type
- Processor microarchitecture
- Number of clock cycles required by an instruction
14. Pipelined Architecture¶
Figure 20: Overlapped Pipeline Instruction Execution.
Figure 21: CPU Pipelined Architecture.
What Is Instruction Pipelining?¶
The hardware industry continues to develop technologies for improving processor speed. Processor performance has improved significantly since the beginning of computer development.
Pipelined Architecture or Instruction Pipelining has significantly improved CPU performance. It allows the CPU to process more instructions within the same number of clock cycles.
Depending on CPU architecture, instruction processing can be described in two modes:
- Pipelined processing
- Non-pipelined processing
The idea of Instruction Pipelining can be compared to production on an assembly line.
On an assembly line, the production process is divided into several jobs so that different jobs can be performed at the same time. This method increases the production rate.
Similarly, in a pipelined architecture, instruction execution is divided into fixed stages, such as:
- Fetch
- Decode
- Execute
During each clock cycle, the CPU completes one stage of an instruction.
Pipeline processing allows the CPU to process parts of several instructions at the same time. Therefore, the program instructions can be completed using fewer clock cycles.
The CPU can process more instructions in parallel. By comparison, a non-pipelined CPU executes only one instruction at a time. Most modern processors support Instruction Pipelining.
In Instruction Pipelining, the CPU completes one part of an instruction during each clock cycle. It may be a Fetch, Decode, or Execute operation.
According to the source example, one round of a Machine Cycle needs twelve Clock Cycles, while one Instruction Cycle may need between one and four Machine Cycles depending on instruction complexity.
What Is Pipelined Architecture?¶
In a Pipelined Architecture, the CPU can process parts of multiple instructions simultaneously.
As a result, the CPU can optimize the instruction-execution sequence. Therefore, fewer Clock Cycles are required to execute the same number of instructions.
15. Non-Pipelined Architecture¶
Figure 22: Sequential Non-Pipeline Instruction Execution.
Figure 23: CPU Non-Pipelined Architecture.
In a Non-Pipelined Architecture, the CPU executes program instructions one after another. It cannot process several instructions in parallel.
As a result, the CPU cannot optimize the instruction-execution sequence in the same way as a pipelined CPU.
Therefore, a Non-Pipelined Architecture requires more Clock Cycles than a Pipelined Architecture to execute the same number of instructions.
16. FetchâDecodeâExecute Cycle: Step by Step¶
Figure 24: Complete CPU flow of Fetch, Decode, and Execute.
Every instruction executed by the CPU passes through different phases at different clock cycles.
To understand the step-by-step execution of an Instruction Cycle, we can divide the cycle into a series of operations initiated by the CPU.
Step 1: Instruction Cycle Starts¶
The first phase of the Instruction Cycle is the Fetch Phase. The cycle begins by initializing the Sequence Counter (SC) to zero.
Step 2: Fetch Phase at Clock Pulse \(T_0\)¶
The Program Counter (PC) register contains the address of the next instruction.
During the first clock cycle, \(T_0\), the address stored in the PC is transferred to the Address Register (AR).
Step 3: Fetch Phase at Clock Pulse \(T_1\)¶
Figure 25: A 16-bit instruction with the \(I\) bit, Opcode, and Address field.
During the next clock cycle, \(T_1\), the instruction is fetched from memory and loaded into the Instruction Register (IR).
At the same time, the Program Counter (PC) is incremented by one.
The PC now points to the memory location of the next instruction to be fetched.
The Instruction Register (IR) is a 16-bit register that supports a 16-bit instruction format.
The 16-bit instruction format contains three parts:
| Bit position | Field | Meaning |
|---|---|---|
| Bit 15 | Addressing Mode or \(I\) bit | Indicates Direct or Indirect mode |
| Bits 12â14 | Opcode | Indicates which operation will be performed |
| Bits 0â11 | Operand Address | Provides the address of the operand |
Step 4: Decode Phase at Clock Pulse \(T_2\)¶
The second major phase of the Instruction Cycle is the Decode Phase.
After the instruction is fetched into the Instruction Register (IR), the CPU's Control Unit decodes it.
The Control Unit decodes the instruction according to the Opcode represented by bits 12, 13, and 14.
Step 5: Decode the Instruction Type at Clock Pulse \(T_2\)¶
The Control Unit first determines the type of instruction. The three possible instruction types are:
- Memory-reference instruction
- Register-reference instruction
- Input/Output instruction
The instruction type is decoded by a 3-to-8 decoder. The type is determined with the help of the value of \(D_7\).
A three-bit Opcode can represent eight values:
The binary Opcode range is:
to
Step 6: Decode Addressing Mode at Clock Pulse \(T_3\)¶
If \(D_7 = 0\), the instruction is a Memory-Reference Instruction.
If \(D_7 = 1\), the instruction may be either:
- A Register-Reference Instruction, or
- An Input/Output Instruction
The \(I\) bit is then checked:
- If \(D_7 = 1\) and \(I = 0\), it is a Register-Reference Instruction.
- If \(D_7 = 1\) and \(I = 1\), it is an Input/Output Instruction.
The Decode Phase ends after the instruction type and the required decision based on the \(I\) bit at bit position 15 have been determined.
For a Memory-Reference Instruction, the Decode operation also determines the Addressing Mode.
The Addressing Mode depends on the \(I\) bit at bit position 15:
- If \(I = 0\), the mode is Direct.
- If \(I = 1\), the mode is Indirect.
After this, the Decode Phase ends and the Execution Phase begins.
Step 7: Execution Phase at Clock Pulse \(T_4\)¶
After the Decode Phase, the Execution Phase begins. During this phase, the processor performs the required operation on the data or Operand placed in the Accumulator Register.
Register-Reference Instruction¶
For a Register-Reference Instruction, execution is straightforward. The processor performs the required operation, and the Sequence Counter (SC) is reset to zero.
Input/Output Instruction¶
For an Input/Output Instruction, the processor performs the required I/O operation, and the Sequence Counter is reset to zero.
Memory-Reference Instruction¶
For a Memory-Reference Instruction, bit 15 determines whether execution uses Direct or Indirect Addressing.
Direct Memory Reference: \(I = 0\)¶
For Direct Addressing, the processor performs the required operation on the data fetched from the address represented by bits 0â11. Then the Sequence Counter is reset to zero.
Indirect Memory Reference: \(I = 1\)¶
For Indirect Addressing, the processor first finds the Effective Address. It then fetches the data from that Effective Address and performs the required operation. Bits 0â11 point toward the Effective Address. Finally, the Sequence Counter is reset to zero.
17. Halt Phase and Interrupt¶
After the Execution Phase is complete, control returns to the Fetch Phase and a new Instruction Cycle begins.
After execution, the Instruction Cycle may enter the Halt Phase if it receives a halt signal caused by an interrupt.
The processor handles the interrupt and then resumes Instruction Cycle execution.
Complete Flow at a Glance¶
Clean-up Record¶
The following non-lesson items from the supplied Markdown were removed:
- Udemy and online-course advertisements
- âJoin the Best Sellerâ promotional section
- Promotional course descriptions
- Advertisement images and referral links
- âRead Moreâ and âScroll back to topâ navigation links
- Empty or repeatedly inserted âInstruction Cycleâ headings
All 25 educational images from the original article appear in both the Bangla and English sections. No educational image was recreated, replaced, or skipped. Only the articleâs six course/advertisement images were removed.
All definitions, explanations, examples, numerical facts, instruction fields, register-transfer statements, clock timings, execution decisions, and interrupt-related lesson content have been retained.
























