Machine code

Machine code (or machine language) is the representation of a that is read and interpreted by the computer hardware (rather than by some other machine code program). A program in machine code consists of a sequence of "instructions" (possibly interspersed with data). An instruction is a binary string, (often written as one or more, or  numbers). Instructions may be all the same size (e.g. one 32-bit word for many modern RISC microprocessors) or of different sizes, in which case the size of the instruction is determined from the first word (e.g. Motorola 68000) or byte (e.g. ). The collection of all possible instructions for a particular computer is known as its "".

Description
Each instruction typically causes the central processing unit (CPU) to perform some fairly simple operation like loading a value from memory into a or adding the numbers in two registers. An instruction consists of an and zero or more. Different processors have different s - the collection of possible operations they can perform.

Execution of machine code may either be into the CPU or it may be controlled by. The basic execution cycle consists of fetching the next instruction from, decoding it (determining which action the operation code specifies and the location of any s or s) and executing it by opening various s (e.g. to allow data to flow from main memory into a CPU register) and enabling s (e.g. signaling to the / ALU to perform an addition).

Humans almost never write programs directly in machine code. Instead, they use programming languages. The simplest kind of programming language is assembly language which usually has a one-to-one correspondence with the resulting machine code instructions but allows the use of (ASCII strings) for the "s" (the part of the instruction which encodes the basic type of operation to perform) and names for locations in the program (branch labels) and for s and s. Other languages are either translated by a compiler into machine code or executed by an.