Machine code

related topics
{system, computer, user}
{math, number, function}
{language, word, form}
{@card@, make, design}

Machine code or machine language is a system of instructions and data executed directly by a computer's central processing unit. Machine code may be regarded as a primitive (and cumbersome) programming language or as the lowest-level representation of a compiled and/or assembled computer program. Programs in interpreted languages [1] are not represented by machine code however, although their interpreter (which may be seen as a processor executing the higher level program) often is. Machine code is sometimes called native code when referring to platform-dependent parts of language features or libraries.[2] Machine code should not be confused with so called "bytecode", which is executed by an interpreter.

Contents

Machine code instructions

Every processor or processor family has its own machine code instruction set. Instructions are patterns of bits that by physical design correspond to different commands to the machine. The instruction set is thus specific to a class of processors using (much) the same architecture. Successor or derivative processor designs often include all the instructions of a predecessor and may add additional instructions. Occasionally a successor design will discontinue or alter the meaning of some instruction code (typically because it is needed for new purposes), affecting code compatibility to some extent; even nearly completely compatible processors may show slightly different behavior for some instructions but this is seldom a problem. Systems may also differ in other details, such as memory arrangement, operating systems, or peripheral devices; because a program normally relies on such factors, different systems will typically not run the same machine code, even when the same type of processor is used.

A machine code instruction set may have all instructions of the same length, or it may have variable-length instructions. How the patterns are organized varies strongly with the particular architecture and often also with the type of instruction. Most instructions have one or more opcode fields which specifies the basic instruction type (such as arithmetic, logical, jump, etc) and the actual operation (such as add or compare) and other fields that may give the type of the operand(s), the addressing mode(s), the addressing offset(s) or index, or the actual value itself (such constant operands contained in an instruction are called immediates).

Full article ▸

related documents
Talker
MMX (instruction set)
Object Linking and Embedding
DEFLATE
Vim (text editor)
Journaling file system
Complex instruction set computer
UCSD Pascal
Baudot code
NewtonScript
Blitz BASIC
ReiserFS
Rsync
Software bug
Lotus Symphony
ACID
FIFO
JFS (file system)
XUL
GNU Privacy Guard
Byte
First-generation programming language
Chmod
Parrot virtual machine
Liberty BASIC
PDP-11
Amdahl's law
Signal-to-noise ratio
Ext2
AltiVec