Loading AI tools
Part of a machine instruction From Wikipedia, the free encyclopedia
In computing, an opcode (abbreviated from operation code)[1][2] is an enumerated value that specifies the operation to be performed. Opcodes are employed in hardware devices such as arithmetic logic units (ALUs) and central processing units (CPUs) as well as in some software instruction sets. In ALUs the opcode is directly applied to circuitry via an input signal bus, whereas in CPUs, the opcode is the portion of a machine language instruction that specifies the operation to be performed.
Opcodes are found in the machine language instructions of CPUs as well as in some abstract computing machines. In CPUs, an opcode may be referred to as instruction machine code,[3] instruction code,[4] instruction syllable,[5][6][7][8] instruction parcel or opstring.[9][2] 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),[10] and can be described by means of an opcode table. The types of operations may include arithmetic, data copying, logical operations, and program control, as well as special instructions (e.g., CPUID).[10]
In addition to the opcode, many instructions also specify the data (known as operands) the operation will act upon, although some instructions may have implicit operands or none at all.[10] 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.[10][11] 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]
Opcodes can be found in so-called byte codes 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 files which are then interpreted by the Java Virtual Machine (JVM), the byte code used in GNU Emacs for compiled Lisp code, .NET Common Intermediate Language (CIL), and many others.[12]
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.