Opcode Definition

Opcode is the portion of a machine language instruction that specifies what operation is to be performed by the central processing unit (CPU). The term is an abbreviation of operation code.

Machine language, also called machine code, refers to instructions coded in patterns of bits (i.e., zeros and ones) that are directly readable and executable by a CPU. Programs must be converted to machine code, referred to as binaries or executables, in order to be executed (i.e., run). The CPU is the main logic unit of a computer; each CPU type has its own machine language.

A complete machine language instruction contains an opcode and, optionally, one or more operands. Each opcode performs only a very simple action on the operand, such as inputting, adding and branching.

Operands are the data on which the operations are to be performed, and they are arguments (i.e., input data) for the opcode. Examples of operands are constants, addresses in main memory (i.e., RAM) and registers. A register is a very small amount of high speed memory built into the CPU.

Created May 13, 2006.
Copyright © 2006 The Linux Information Project. All Rights Reserved.