Opcode: Difference between revisions

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
No edit summary
Line 2:
{{Use dmy dates|date=March 2020|cs1-dates=y}}
{{Machine code}}
In [[computing]], an '''opcode''' (abbreviated from '''operation code''')<ref name="Barron_1978_Opcode"/><ref name="Chiba_2007"/> is an [[enumeration|enumerated value]] that specifies the operation to be performed. Opcodes are employed in hardware devices such as [[arithmetic logic unit]]s (ALUs) and, [[central processing units]] (CPUs), as well as in someand software instruction sets. In ALUs, the opcode is directly applied to circuitry via an input signal bus,. whereasIn contrast, in CPUs, the opcode is the portion of a [[machine code|machine language]] [[instruction (computer science)|instruction]] that specifies the operation to be performed.
 
==CPUs==
Opcodes are found in the machine language instructions of CPUs as well as in some [[virtual machine#Process virtual machines|abstract computing machines]]. In CPUs, an opcode may be referred to as an '''instruction machine code''',<ref name="Intel_1973_MCS-4"/> '''instruction code''',<ref name="Intel_1974_MCS-40"/> '''instruction syllable''',<ref name="Jones_1988_CISC"/><ref name="Domagała_2012"/><ref name="Smotherman_2013"/><ref name="Jones_2016_CISC"/> '''instruction parcel,''' or '''opstring'''.<ref name="Schulman_2005"/><ref name="Chiba_2007"/> For any particular processor (which may be a general CPU or a more specialized processing unit), the opcodes are defined by the processor's [[instruction set architecture]] (ISA),.<ref name="Hennessy_2017"/> andThey can be described by means ofusing an [[opcode table]]. The types of operations may include [[arithmetic]], data copying, [[logical operation]]s, and program control, as well asand special instructions (e.g., [[CPUID]]).<ref name="Hennessy_2017"/>
 
In addition to the opcode, many instructions also specify the data (known as [[operand]]s) the operation will act upon, although some instructions may have implicit operands or none at all.<ref name="Hennessy_2017"/> Some instruction sets have nearly uniform fields for opcode and operand specifiers, whereas others (e.g., [[x86]] architecture) have a less uniform, variable-length structure.<ref name="Hennessy_2017"/><ref name="Mansfield_1983"/> Instruction sets can be extended through the use of opcode prefixes, which add a subset of new instructions made up of existing opcodes following reserved byte sequences.{{Citation needed|date=February 2023}}
 
=={{Anchor|SIS}}Software instruction sets==
Opcodes can be found in so-called [[byte code]]s and other representations intended for a software interpreter rather than a hardware device. These software-based instruction sets often employ slightly higher-level data types and operations than most hardware counterparts, but are nevertheless constructed along similar lines. Examples include the byte code found in [[Java class file|Java class files,]]s which are then interpreted by the [[Java virtual machine|Java Virtual Machine]] (JVM), the byte code used in [[GNU Emacs]] for compiled [[Lisp (programming language)|Lisp]] code, .NET [[Common Intermediate Language]] (CIL), and many others.<ref name="bytecode"/>
 
==See also==