Instruction (computer science)
From Wikipedia, the free encyclopedia
- For other uses, see Instruction.
In computer science, an instruction typically refers to a single operation of a processor within a computer architecture.
The types of instruction allowed are defined and determined within the particular platform's instruction set architecture (ISA), which also determines register sources and destination operands, and perhaps an immediate field. Machine instructions are numbers represented in binary. Assembly code is a developed form of short code. A portion (field) of the instruction designates the operation to be done and is called an opcode; since the numeric value of this is not very meaningful to humans, a corresponding short abbreviation is used by programmers. The size, or "width" of an instruction depends on the architecture of the platform, but it is usually from 4 to 64 bits wide. The following is an example of a x86 instruction in symbolic assembler notation:
- SHL AX, 01
SHL is called the operation, and AX, 01 are called operands. AX is the name of a register, 01 is a constant. In this example, SHL is a mnemonic abbreviation for "shift left". The instruction causes the value in AX to be shifted left by 01 bit position.
- Command (computing)
- Data (computing)
- Machine language
Category: Machine code