AskDefine | Define opcode

Extensive Definition

In computer technology, an opcode (operation code) is the portion of a machine language instruction that specifies the operation to be performed. Their specification and format are laid out in the instruction set architecture of the processor in question (which may be a general CPU or a more specialized processing unit). Apart from the opcode itself, an instruction normally also has one or more specifiers for operands (i.e. data) on which the operation should act, although some operations may have implicit operands, or none at all. There are instruction sets with nearly uniform fields for opcode and operand specifiers, as well as others (the x86 architecture for instance) with a more complicated, varied length structure.
Depending on architecture, the operands may be register values, values in the stack, other memory values, I/O ports, etc, specified and accessed using more or less complex addressing modes. The types of operations include arithmetics, data copying, logical operations, and program control, as well as special instructions (such as CPUID and others).

Assembly

As machine language is just numerical codes, addresses, and other constants, it is tedious and difficult for humans to program in directly, so if a higher-level programming language is not desired or fit for the task, an assembly language is used. In assembly language, mnemonics, corresponding to the instructions and operands in the machine language, are used to enhance the readability and comprehensibility while still giving precise control over the machine instructions generated. A program called an assembler transforms assembly language into machine code.

Software instruction sets

Opcodes can also 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 Java programming language's Java Virtual Machine (JVM), the byte code used in GNU Emacs for compiled LISP code, and many others.

See also

References

opcode in German: Opcode
opcode in Spanish: Opcode
opcode in French: Opcode
opcode in Dutch: Opcode
opcode in Portuguese: Opcode
Privacy Policy, About Us, Terms and Conditions, Contact Us
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2
Material from Wikipedia, Wiktionary, Dict
Valid HTML 4.01 Strict, Valid CSS Level 2.1