Encylopedia Jr
The Kid's Encyclopedia: A great information resource for kids, schools, and anybody who wants to learn.
Kids: Be sure to check with your parents or teachers before using this or any web site.



Browse by Subject
Browse by Letter


This site is designed to be an encyclopedia for use by kids. Kids and children, please ask your parents or teachers prior to using this site or the internet.







Opcode

From Encyclopedia Jr, free information reference for Kids

In computer science, an opcode is the portion of a machine language instruction that specifies the operation to be performed. The term is an abbreviation of Operation Code. Their specification and format will be laid out in the instruction set architecture (ISA) of the computer hardware component in question—normally a CPU, but possibly a more specialised unit. A complete machine language instruction contains an opcode and, optionally, the specification of one or more operands—what data the operation should act upon. Some operations have implicit operands, or indeed none. Some ISAs have instructions with defined fields for opcodes and operands, while others (e.g. the Intel x86 architecture) have a more complicated and ad-hoc structure.

The operands upon which opcodes operate may, depending on CPU architecture, consist of registers, values in memory, values stored on the stack, I/O ports, the bus, etc. The operations an opcode may specify can include arithmetic, data copying, logical operations, and program control.

Opcodes can also be found in byte codes interpreted by a byte code interpreter (or virtual machine, in one sense of that term). In these, an instruction set architecture is created to be interpreted by software, rather than a hardware device. Often, byte code interpreters work with higher-level data types and operations than a hardware instruction set, but are 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.

Machine language is tedious and difficult for humans to program in directly, so if the abstraction given by a higher-level programming language is not desired, an assembly language is used. Here, mnemonic instructions are used that correspond to the opcode and operand specifications of the machine language instructions generated. This gives a greater level of readability and comprehensibility than working with machine language operations directly, while still giving accurate control of the machine language generated. A program called an assembler transforms assembly language into machine code.

[edit] See also

  • Illegal opcode

Citation Help

APA Style: Reference List

Encyclopedia Jr (2007). Opcode. Retrieved May 27, 2012, from http://www.encyclopediajr.com/wikiarticle/o/p/c/opcode.

MLA Style: Works Cited Page

"Opcode." Encyclopedia Jr. 2007. 27 May 2012 <http://www.encyclopediajr.com/wikiarticle/o/p/c/opcode>.


This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article opcode.


Encyclopedia Jr Home Page  Parents and Teachers  About Encyclopedia Junior 


This site is a product of TSI, Copyright 2012, All Rights Reserved. By using this site you agree to the Terms of Use.