Instruction Set Notes | Basic Computer Engineering | RGPV BTech First Year


Instruction Set

Instruction Set Computer Architecture का एक महत्वपूर्ण भाग है। CPU किसी भी कार्य को सीधे नहीं समझता बल्कि उसे Instructions के रूप में Commands दी जाती हैं। इन सभी Commands के समूह को Instruction Set कहा जाता है। प्रत्येक Processor का अपना Instruction Set होता है जो यह निर्धारित करता है कि Processor कौन-कौन से Operations Execute कर सकता है।


Introduction

Computer Program अनेक Instructions का समूह होता है। जब Program Execute होता है तो CPU एक-एक Instruction को Fetch, Decode और Execute करता है। Instruction Set CPU द्वारा समझी जाने वाली सभी Instructions का Collection होता है।

Instruction Set Architecture (ISA) Processor और Software के बीच Interface का कार्य करती है।


Definition of Instruction Set

Instruction Set उन सभी Machine Language Instructions का समूह है जिन्हें कोई Processor Execute कर सकता है।

Instruction Set = Collection of Machine Instructions


Instruction Format

एक Instruction सामान्यतः दो भागों से मिलकर बनी होती है।

  • Opcode (Operation Code)
  • Operand
Field Description
Opcode Operation to Perform
Operand Data or Address

Example: ADD R1, R2

यह Instruction Register R1 और R2 के Data को जोड़ती है।


Types of Instructions

  1. Data Transfer Instructions
  2. Arithmetic Instructions
  3. Logical Instructions
  4. Branch Instructions
  5. Input Output Instructions
  6. Machine Control Instructions

1. Data Transfer Instructions

इन Instructions का उपयोग Data को एक Location से दूसरी Location पर भेजने के लिए किया जाता है।

  • MOV
  • LOAD
  • STORE
  • PUSH
  • POP

2. Arithmetic Instructions

Arithmetic Operations Perform करने के लिए उपयोग की जाती हैं।

  • ADD
  • SUB
  • MUL
  • DIV
  • INC
  • DEC

3. Logical Instructions

Logical Operations तथा Comparisons के लिए उपयोग होती हैं।

  • AND
  • OR
  • XOR
  • NOT
  • CMP

4. Branch Instructions

Program Flow को बदलने के लिए उपयोग की जाती हैं।

  • JMP
  • CALL
  • RET
  • LOOP

5. Input Output Instructions

Input तथा Output Devices के साथ Communication के लिए उपयोग की जाती हैं।

  • IN
  • OUT

6. Machine Control Instructions

CPU के Internal Control के लिए उपयोग की जाती हैं।

  • HLT
  • NOP
  • WAIT

Instruction Execution Cycle

  1. Fetch Instruction
  2. Decode Instruction
  3. Fetch Operand
  4. Execute Instruction
  5. Store Result

CPU Program Counter की सहायता से Instruction Fetch करता है और फिर उसे Execute करता है।


Addressing Modes

Addressing Mode यह निर्धारित करता है कि Operand कहाँ स्थित है।

Addressing Mode Description
Immediate Data Directly Present
Direct Address Specified
Indirect Address Stored in Register
Register Operand in Register

Instruction Set Architecture (ISA)

Instruction Set Architecture Hardware और Software के बीच Interface प्रदान करती है। ISA यह निर्धारित करती है कि Processor किस प्रकार Instructions को Execute करेगा।

  • Instruction Formats
  • Registers
  • Addressing Modes
  • Data Types
  • Memory Model

RISC and CISC Instruction Sets

Feature RISC CISC
Instructions Simple Complex
Execution Time Fast Moderate
Hardware Complexity Low High

Advantages of Instruction Set

  • Efficient Program Execution
  • Hardware Software Compatibility
  • Standardized Processing
  • Improved Performance
  • Easy Programming

Limitations

  • Hardware Dependency
  • Architecture Specific Design
  • Complex Instruction Decoding
  • Performance Constraints

Applications

  • Microprocessors
  • Embedded Systems
  • Mobile Processors
  • Desktop Computers
  • Servers
  • Supercomputers

Industrial Importance

  • Processor Manufacturing
  • Operating System Development
  • Compiler Design
  • Embedded Device Development
  • Cloud Infrastructure

Viva Questions

  1. What is an Instruction Set?
  2. What is Opcode?
  3. What is Operand?
  4. What are Data Transfer Instructions?
  5. What are Arithmetic Instructions?
  6. What are Logical Instructions?
  7. What is ISA?
  8. What is Addressing Mode?
  9. Difference between RISC and CISC?
  10. What is Instruction Cycle?

Exam Oriented Important Questions

  1. Define Instruction Set.
  2. Explain Instruction Format.
  3. Discuss Types of Instructions.
  4. Explain Instruction Execution Cycle.
  5. What is Instruction Set Architecture?
  6. Differentiate between RISC and CISC.
  7. Explain Addressing Modes with Examples.

Conclusion

Instruction Set CPU की कार्यक्षमता का आधार है। Processor द्वारा Execute की जाने वाली सभी Instructions इसी Instruction Set का भाग होती हैं। Computer Architecture, Processor Design तथा Operating Systems को समझने के लिए Instruction Set का अध्ययन अत्यंत आवश्यक है।