Skip to content

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 āĻŦāĻžāĻĻ āĻĻ⧇āĻ“ā§ŸāĻž āĻšā§ŸāύāĻŋāĨ¤

āϏ⧂āϚāĻŋāĻĒāĻ¤ā§āϰ

  1. Instruction Cycle āϕ⧀?
  2. āĻ•āĻŽā§āĻĒāĻŋāωāϟāĻžāϰ āϕ⧀āĻ­āĻžāĻŦ⧇ Program Execute āĻ•āϰ⧇?
  3. Computer Program āϕ⧀?
  4. Program Instruction āϕ⧀?
  5. Central Processing Unit (CPU) āϕ⧀?
  6. CPU Instruction Set Architecture (ISA)
  7. Instruction Format āϕ⧀?
  8. Opcode āϕ⧀?
  9. Operand āϕ⧀?
  10. Addressing Mode āϕ⧀?
  11. Machine Cycle āϕ⧀?
  12. Instruction Cycle āĻ“ Clock Pulse
  13. CPU Clock Speed āĻ“ Instruction Cycle
  14. Pipelined Architecture
  15. Non-Pipelined Architecture
  16. Fetch–Decode–Execute Cycle: āϧāĻžāĻĒ⧇ āϧāĻžāĻĒ⧇
  17. 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 āϕ⧀?

āϚāĻŋāĻ¤ā§āϰ ā§§: āĻŽā§‚āϞ article-āĻāϰ CPU Instruction Cycle diagram

āϚāĻŋāĻ¤ā§āϰ ā§§: 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 āĻ•āϰ⧇:

  1. Fetch — instruction āύāĻŋā§Ÿā§‡ āφāϏāĻž
  2. Decode — instruction-āĻāϰ āĻ…āĻ°ā§āĻĨ āĻŦā§‹āĻāĻž
  3. Execute — āύāĻŋāĻ°ā§āϧāĻžāϰāĻŋāϤ āĻ•āĻžāϜ āĻ•āϰāĻž
  4. Store — āĻĢāϞāĻžāĻĢāϞ āϏāĻ‚āϰāĻ•ā§āώāĻŖ āĻ•āϰāĻž

Instruction Cycle-āĻāϰ āĻĒā§āϰāϤāĻŋāϟāĻŋ āĻ…āĻ‚āĻļ āϏāĻŽā§āĻĒāĻ¨ā§āύ āĻ•āϰāϤ⧇ āĻāĻ• āĻŦāĻž āĻāĻ•āĻžāϧāĻŋāĻ• Machine Cycle āϞāĻžāĻ—āϤ⧇ āĻĒāĻžāϰ⧇āĨ¤

āϗ⧁āϰ⧁āĻ¤ā§āĻŦāĻĒā§‚āĻ°ā§āĻŖ āĻĒāϰāĻŋāĻˇā§āĻ•āĻžāϰ āϧāĻžāϰāĻŖāĻž: āĻŽā§‚āϞ āϞ⧇āĻ–āĻžā§Ÿ āĻĒā§āϰāĻĨāĻŽā§‡ āϤāĻŋāύāϟāĻŋ āĻŦ⧜ āϧāĻžāĻĒ—Fetch, Decode āĻ“ Execute—āĻŦāϞāĻž āĻšā§Ÿā§‡āϛ⧇āĨ¤ āĻĒāϰ⧇ Store-āϕ⧇ āϚāϤ⧁āĻ°ā§āĻĨ operation āĻšāĻŋāϏ⧇āĻŦ⧇ āĻĻ⧇āĻ–āĻžāύ⧋ āĻšā§Ÿā§‡āϛ⧇āĨ¤ āĻĻ⧁āĻŸā§‹āχ āĻāĻ•āχ instruction execution process āĻŦā§‹āĻāĻžā§ŸāĨ¤ āϤāĻŋāύ āϧāĻžāĻĒ⧇āϰ āĻŦā§āϝāĻžāĻ–ā§āϝāĻžā§Ÿ result store āĻ•āϰāĻžāϕ⧇ Execute āϧāĻžāĻĒ⧇āϰ āĻ…āĻ‚āĻļ āĻšāĻŋāϏ⧇āĻŦ⧇ āϧāϰāĻž āĻšā§ŸāĨ¤


⧍. āĻ•āĻŽā§āĻĒāĻŋāωāϟāĻžāϰ āϕ⧀āĻ­āĻžāĻŦ⧇ Program Execute āĻ•āϰ⧇?

āϚāĻŋāĻ¤ā§āϰ ⧍: āĻŽā§‚āϞ article-āĻāϰ Instruction Cycle example

āϚāĻŋāĻ¤ā§āϰ ⧍: 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 āϕ⧀?

āϚāĻŋāĻ¤ā§āϰ ā§Š: āĻŽā§‚āϞ article-āĻāϰ Computer Program diagram

āϚāĻŋāĻ¤ā§āϰ ā§Š: 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 āĻ•āϰāĻžāϰ āĻĒā§āϰāĻ•ā§āϰāĻŋ⧟āĻž

āϚāĻŋāĻ¤ā§āϰ ā§Ē: āĻŽā§‚āϞ article-āĻāϰ Computer Program Compilation diagram

āϚāĻŋāĻ¤ā§āϰ ā§Ē: 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 āϕ⧀?

āϚāĻŋāĻ¤ā§āϰ ā§Ģ: āĻŽā§‚āϞ article-āĻāϰ Program Instructions diagram

āϚāĻŋāĻ¤ā§āϰ ā§Ģ: Program statement āĻĨ⧇āϕ⧇ machine instructionāĨ¤

āϚāĻŋāĻ¤ā§āϰ ā§Ŧ: āĻŽā§‚āϞ article-āĻāϰ Program Compilation diagram

āϚāĻŋāĻ¤ā§āϰ ā§Ŧ: 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) āϕ⧀?

āϚāĻŋāĻ¤ā§āϰ ā§­: āĻŽā§‚āϞ article-āĻāϰ Program Execution and Instruction Cycle diagram

āϚāĻŋāĻ¤ā§āϰ ā§­: CPU āϕ⧀āĻ­āĻžāĻŦ⧇ program execute āĻ•āϰ⧇āĨ¤

āϚāĻŋāĻ¤ā§āϰ ā§Ž: āĻŽā§‚āϞ article-āĻāϰ Central Processing Unit diagram

āϚāĻŋāĻ¤ā§āϰ ā§Ž: 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)

āϚāĻŋāĻ¤ā§āϰ ⧝: āĻŽā§‚āϞ article-āĻāϰ Instruction Set Architecture diagram

āϚāĻŋāĻ¤ā§āϰ ⧝: ISA-āĻāϰ basic position āĻāĻŦāĻ‚ āĻ•āĻžāϜāĨ¤

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ļ: āĻŽā§‚āϞ article-āĻāϰ Microprocessor Instruction Set Architecture diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ļ: 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 āϕ⧀?

āϚāĻŋāĻ¤ā§āϰ ā§§ā§§: āĻŽā§‚āϞ article-āĻāϰ Program Instruction Format diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§§: 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 āĻĒā§āϰāϧāĻžāύāϤ āϤāĻŋāύāϟāĻŋ āĻ…āĻ‚āĻļ āύāĻŋā§Ÿā§‡ āĻ—āĻ āĻŋāϤ:

  1. Addressing Mode
  2. Opcode
  3. 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 āϕ⧀?

āϚāĻŋāĻ¤ā§āϰ ⧧⧍: āĻŽā§‚āϞ article-āĻāϰ Instruction Format āĻ“ Addressing Mode diagram

āϚāĻŋāĻ¤ā§āϰ ⧧⧍: 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 āϕ⧀?

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Š: āĻŽā§‚āϞ article-āĻāϰ Machine Cycle diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Š: Machine Cycle-āĻāϰ āĻĒā§āϰāϧāĻžāύ operationāĨ¤

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ē: āĻŽā§‚āϞ article-āĻāϰ Instruction Cycle āĻāĻŦāĻ‚ Machine Cycle diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ē: 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 āĻšāϞ⧋:

  1. Fetch
  2. Decode
  3. Execute
  4. 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

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ģ: āĻŽā§‚āϞ article-āĻāϰ Instruction Cycle āĻ“ Instruction Format diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ģ: Instruction format āϏāĻš Instruction CycleāĨ¤

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ŧ: āĻŽā§‚āϞ article-āĻāϰ Instruction Execution diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ŧ: 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

āϚāĻŋāĻ¤ā§āϰ ā§§ā§­: āĻŽā§‚āϞ article-āĻāϰ CPU Clock Pulse diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§­: CPU clock pulse āĻ“ timing signalāĨ¤

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ž: āĻŽā§‚āϞ article-āĻāϰ Control Unit Timing and Control Logic diagram

āϚāĻŋāĻ¤ā§āϰ ā§§ā§Ž: Control Unit-āĻāϰ timing and control logicāĨ¤

āϚāĻŋāĻ¤ā§āϰ ⧧⧝: āĻŽā§‚āϞ article-āĻāϰ CPU Clock Speed diagram

āϚāĻŋāĻ¤ā§āϰ ⧧⧝: 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,000,000,000 \]

āωāĻĻāĻžāĻšāϰāĻŖ āĻšāĻŋāϏ⧇āĻŦ⧇, 3 GHz clock-speed-āĻāϰ āĻāĻ•āϟāĻŋ processor āĻĒā§āϰāϤāĻŋ āϏ⧇āϕ⧇āĻ¨ā§āĻĄā§‡:

\[ 3,000,000,000 \]

āϟāĻŋ clock cycle āϏāĻŽā§āĻĒāĻ¨ā§āύ āĻ•āϰ⧇āĨ¤

Processor-āĻāϰ speed āφāϰāĻ“ āĻ•āĻŋāϛ⧁ āĻŦāĻŋāĻˇā§Ÿā§‡āϰ āĻ“āĻĒāϰāĻ“ āĻ…āύ⧇āĻ•āϟāĻž āύāĻŋāĻ°ā§āĻ­āϰ āĻ•āϰ⧇:

  • Processor-āĻāϰ āϧāϰāύ
  • Processor-āĻāϰ Microarchitecture
  • āĻāĻ•āϟāĻŋ instruction āϏāĻŽā§āĻĒāĻ¨ā§āύ āĻ•āϰāϤ⧇ āĻĒā§āĻ°ā§Ÿā§‹āϜāĻ¨ā§€ā§Ÿ Clock Cycle-āĻāϰ āϏāĻ‚āĻ–ā§āϝāĻž

ā§§ā§Ē. Pipelined Architecture

āϚāĻŋāĻ¤ā§āϰ ⧍ā§Ļ: āĻŽā§‚āϞ article-āĻāϰ Pipeline Instruction Execution diagram

āϚāĻŋāĻ¤ā§āϰ ⧍ā§Ļ: Overlap āĻ•āϰ⧇ Pipeline Instruction ExecutionāĨ¤

āϚāĻŋāĻ¤ā§āϰ ⧍⧧: āĻŽā§‚āϞ article-āĻāϰ CPU Pipelined Architecture diagram

āϚāĻŋāĻ¤ā§āϰ ⧍⧧: 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 āĻĻ⧁āχāĻ­āĻžāĻŦ⧇ āĻšāϤ⧇ āĻĒāĻžāϰ⧇:

  1. Pipelined Processing
  2. 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

āϚāĻŋāĻ¤ā§āϰ ⧍⧍: āĻŽā§‚āϞ article-āĻāϰ Non-Pipeline Instruction Execution diagram

āϚāĻŋāĻ¤ā§āϰ ⧍⧍: āĻāĻ•āϟāĻŋāϰ āĻĒāϰ āĻāĻ•āϟāĻŋ Non-Pipeline Instruction ExecutionāĨ¤

āϚāĻŋāĻ¤ā§āϰ ā§¨ā§Š: āĻŽā§‚āϞ article-āĻāϰ CPU Non-Pipelined Architecture diagram

āϚāĻŋāĻ¤ā§āϰ ā§¨ā§Š: 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: āϧāĻžāĻĒ⧇ āϧāĻžāĻĒ⧇

āϚāĻŋāĻ¤ā§āϰ ⧍ā§Ē: āĻŽā§‚āϞ article-āĻāϰ āϏāĻŽā§āĻĒā§‚āĻ°ā§āĻŖ CPU Instruction Cycle diagram

āϚāĻŋāĻ¤ā§āϰ ⧍ā§Ē: 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 āĻ•āϰāĻž āĻšā§ŸāĨ¤

\[ SC \leftarrow 0 \]

āϧāĻžāĻĒ ā§¨: Clock Pulse \(T_0\)-āϤ⧇ Fetch Phase

Program Counter āĻŦāĻž PC register-āĻ āĻĒāϰāĻŦāĻ°ā§āϤ⧀ instruction-āĻāϰ address āĻĨāĻžāϕ⧇āĨ¤

āĻĒā§āϰāĻĨāĻŽ Clock Cycle \(T_0\)-āϤ⧇ PC-āϤ⧇ āĻĨāĻžāĻ•āĻž address Address Register āĻŦāĻž AR-āĻ āĻĒāĻžāĻ āĻžāύ⧋ āĻšā§ŸāĨ¤

\[ AR \leftarrow PC \]

āϧāĻžāĻĒ ā§Š: Clock Pulse \(T_1\)-āϤ⧇ Fetch Phase

āϚāĻŋāĻ¤ā§āϰ ⧍ā§Ģ: āĻŽā§‚āϞ article-āĻāϰ 16-bit Instruction Format diagram

āϚāĻŋāĻ¤ā§āϰ ⧍ā§Ģ: \(I\) bit, Opcode āĻāĻŦāĻ‚ Address field-āϏāĻš 16-bit instructionāĨ¤

āĻĒāϰ⧇āϰ Clock Cycle \(T_1\)-āϤ⧇ memory āĻĨ⧇āϕ⧇ instruction fetch āĻ•āϰ⧇ Instruction Register āĻŦāĻž IR-āĻ āϰāĻžāĻ–āĻž āĻšā§ŸāĨ¤

āĻāĻ•āχ āϏāĻŽā§Ÿā§‡ Program Counter āĻŦāĻž PC-āĻāϰ āĻŽāĻžāύ āĻāĻ• āĻŦāĻžā§œāĻžāύ⧋ āĻšā§ŸāĨ¤

\[ IR \leftarrow M[AR] \]
\[ PC \leftarrow PC + 1 \]

āĻāĻ–āύ 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 āĻšāϤ⧇ āĻĒāĻžāϰ⧇:

  1. Memory-Reference Instruction
  2. Register-Reference Instruction
  3. Input/Output Instruction

Instruction-āĻāϰ āϧāϰāύ 3-to-8 Decoder āĻĻāĻŋā§Ÿā§‡ decode āĻ•āϰāĻž āĻšā§ŸāĨ¤ \(D_7\)-āĻāϰ value āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻ•āϰ⧇ instruction-āĻāϰ āϧāϰāύ āύāĻŋāĻ°ā§āϧāĻžāϰāĻŖ āĻ•āϰāĻž āĻšā§ŸāĨ¤

\[ D_0, D_1, D_2, \ldots, D_6, D_7 \]
\[ D_0 = 000 \]
\[ D_7 = 111 \]

Three-bit Opcode āĻĻāĻŋā§Ÿā§‡ āφāϟāϟāĻŋ value āĻĻ⧇āĻ–āĻžāύ⧋ āϝāĻžā§Ÿ:

\[ D_0, D_1, D_2, \ldots, D_6, D_7 \]

āĻ…āĻ°ā§āĻĨāĻžā§Ž binary Opcode-āĻāϰ range:

\[ D_0 = 000 \]

āĻĨ⧇āϕ⧇

\[ D_7 = 111 \]

āϧāĻžāĻĒ ā§Ŧ: 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 āĻ•āϰāĻž āĻšā§ŸāĨ¤

\[ \text{Execute Register-Reference Instruction} \]
\[ SC \leftarrow 0 \]

Input/Output Instruction

Input/Output Instruction-āĻāϰ āĻ•ā§āώ⧇āĻ¤ā§āϰ⧇ processor āĻĒā§āĻ°ā§Ÿā§‹āϜāĻ¨ā§€ā§Ÿ I/O operation āĻ•āϰ⧇ āĻāĻŦāĻ‚ Sequence Counter āφāĻŦāĻžāϰ zero āĻ•āϰāĻž āĻšā§ŸāĨ¤

\[ \text{Execute Input/Output Instruction} \]
\[ SC \leftarrow 0 \]

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 āĻ•āϰāĻž āĻšā§ŸāĨ¤

\[ \text{Execute Direct Memory-Reference Instruction} \]
\[ SC \leftarrow 0 \]
Indirect Memory Reference: \(I = 1\)

Indirect Addressing-āĻ processor āĻĒā§āϰāĻĨāĻŽā§‡ Effective Address āĻŦ⧇āϰ āĻ•āϰ⧇āĨ¤ āĻāϰāĻĒāϰ āϏ⧇āχ Effective Address āĻĨ⧇āϕ⧇ data fetch āĻ•āϰ⧇ āĻĒā§āĻ°ā§Ÿā§‹āϜāĻ¨ā§€ā§Ÿ operation āϚāĻžāϞāĻžā§ŸāĨ¤ Bits 0–11 Effective Address-āĻāϰ āĻĻāĻŋāϕ⧇ āύāĻŋāĻ°ā§āĻĻ⧇āĻļ āĻ•āϰ⧇āĨ¤ āϏāĻŦāĻļ⧇āώ⧇ Sequence Counter zero āĻ•āϰāĻž āĻšā§ŸāĨ¤

\[ \text{Execute Indirect Memory-Reference Instruction} \]
\[ SC \leftarrow 0 \]

ā§§ā§­. 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

  1. What Is an Instruction Cycle?
  2. How Does a Computer Execute a Program?
  3. What Is a Computer Program?
  4. What Is a Program Instruction?
  5. What Is the Central Processing Unit?
  6. CPU Instruction Set Architecture (ISA)
  7. What Is an Instruction Format?
  8. What Is an Opcode?
  9. What Is an Operand?
  10. What Is an Addressing Mode?
  11. What Is a Machine Cycle?
  12. Instruction Cycle and Clock Pulses
  13. CPU Clock Speed and Instruction Cycle
  14. Pipelined Architecture
  15. Non-Pipelined Architecture
  16. Fetch–Decode–Execute Cycle: Step by Step
  17. 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: Original article CPU Instruction Cycle diagram

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:

  1. Fetch
  2. Decode
  3. Execute
  4. 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: Original article Instruction Cycle example

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: Original article Computer Program diagram

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: Original article Computer Program Compilation diagram

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: Original article Program Instructions diagram

Figure 5: Conversion of program statements into machine instructions.

Figure 6: Original article Program Compilation diagram

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: Original article Program Execution and Instruction Cycle diagram

Figure 7: How the CPU executes a program.

Figure 8: Original article Central Processing Unit diagram

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: Original article Instruction Set Architecture diagram

Figure 9: Basic position and function of the ISA.

Figure 10: Original article Microprocessor Instruction Set Architecture diagram

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: Original article Program Instruction Format diagram

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:

  1. Addressing Mode
  2. Opcode
  3. 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: Original article Instruction Format and Addressing Mode diagram

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: Original article Machine Cycle diagram

Figure 13: Major operations of a Machine Cycle.

Figure 14: Original article Instruction Cycle and Machine Cycle diagram

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:

  1. Fetch
  2. Decode
  3. Execute
  4. 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: Original article Instruction Cycle and Instruction Format diagram

Figure 15: Instruction Cycle with the instruction format.

Figure 16: Original article Instruction Execution diagram

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: Original article CPU Clock Pulse diagram

Figure 17: CPU clock pulses and timing signals.

Figure 18: Original article Control Unit Timing and Control Logic diagram

Figure 18: Timing and control logic of the Control Unit.

Figure 19: Original article CPU Clock Speed diagram

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:

\[ 3,000,000,000 \]

clock cycles per second.

\[ 3,000,000,000 \]

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: Original article Pipeline Instruction Execution diagram

Figure 20: Overlapped Pipeline Instruction Execution.

Figure 21: Original article CPU Pipelined Architecture diagram

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:

  1. Pipelined processing
  2. 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: Original article Non-Pipeline Instruction Execution diagram

Figure 22: Sequential Non-Pipeline Instruction Execution.

Figure 23: Original article CPU Non-Pipelined Architecture diagram

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: Original article complete CPU Instruction Cycle diagram

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.

\[ SC \leftarrow 0 \]

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).

\[ AR \leftarrow PC \]

Step 3: Fetch Phase at Clock Pulse \(T_1\)

Figure 25: Original article 16-bit Instruction Format diagram

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.

\[ IR \leftarrow M[AR] \]
\[ PC \leftarrow PC + 1 \]

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:

  1. Memory-reference instruction
  2. Register-reference instruction
  3. 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:

\[ D_0, D_1, D_2, \ldots, D_6, D_7 \]

The binary Opcode range is:

\[ D_0 = 000 \]

to

\[ D_7 = 111 \]
\[ D_0, D_1, D_2, \ldots, D_6, D_7 \]
\[ D_0 = 000 \]
\[ D_7 = 111 \]

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.

\[ \text{Execute Register-Reference Instruction} \]
\[ SC \leftarrow 0 \]

Input/Output Instruction

For an Input/Output Instruction, the processor performs the required I/O operation, and the Sequence Counter is reset to zero.

\[ \text{Execute Input/Output Instruction} \]
\[ SC \leftarrow 0 \]

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.

\[ \text{Execute Direct Memory-Reference Instruction} \]
\[ SC \leftarrow 0 \]
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.

\[ \text{Execute Indirect Memory-Reference Instruction} \]
\[ SC \leftarrow 0 \]

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.