Machine instruction ( मशीन इंस्ट्रक्शन )
Machine instruction एक कंप्यूटर प्रोग्रामिंग term है, जो हार्डवेयर लेवल पर एक specific task या operation को perform करने के लिए कंप्यूटर हार्डवेयर द्वारा समझा जाने वाला command होता है।
प्रत्येक machine instruction एक यूनिक बाइनरी कोड represent करता है, जिसे कंप्यूटर हार्डवेयर directly execute कर सकता है। जैसे कि, “add” instruction एक number को दूसरे number से जोड़ने के लिए use होता है, “subtraction” instruction एक number से दूसरे number को घटाने के लिए use होता है, और ऐसे ही बहुत सारी instructions होती हैं जो अलग-अलग task के लिए define की गई होती हैं।
जब एक programmer code लिखता है, वह high-level programming language का use करता है जिसे कंप्यूटर हार्डवेयर directly नहीं समझ सकता, इसलिए उस code को machine instruction में ट्रांसलेट करके कंप्यूटर हार्डवेयर को instruction provide की जाती है।
एक machine instruction के कुछ essential elements होते हैं:
1.Opcode(Operation Code)
Opcode एक विशिष्ट task या operation को identify करने के लिए होता है। यह instruction का मुख्य भाग होता है जो यह निर्धारित करता है कि instruction किस प्रकार का operation perform करेगी। प्रत्येक opcode का यूनिक बाइनरी code होता है जो हार्डवेयर के लिए समझा जा सकता है।
2.Operands
Operands, instruction के साथ provide किए गए डेटा values या addresses होते हैं जो instruction के लिए जरूरी होते हैं। जैसे कि “add” instruction के लिए operands दो नंबर होते हैं जिन्हें जोड़ा जाता है।
3. Addressing mode
Addressing mode यह निर्धारित करता है कि operands की value कहां से read करनी है या कहां store करनी है। ये instruction के साथ संबंधित memory locations या registers का उपयोग करता है।
4.Size
Size element यह निर्धारित करता है कि instruction का length कितना है होगा। Instruction की length अलग-अलग architectures पर निर्भर करती है।
5. Control bits
Control bits instruction का execution flow को गाइड करते हैं और कौन सा हार्डवेयर component किस task के लिए responsible होगा, ये decide करते हैं। इन elements की मदद से machine instruction हार्डवेयर लेवल पर execute किया जाता है और कंप्यूटर को विशिष्ट task perform करने की instruction मिलती है।