Machine code is a strictly numerical language, and it is the lowest-level interface to the CPU intended for a programmer.
Assembly language provides a direct map between the numerical machine code and a human-readable mnemonic.
While it is possible to write programs directly in machine code, managing individual bits and calculating numerical addresses is tedious and error-prone.
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 compatible processors may show slightly different behavior for some instructions, but this is rarely a problem.
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.
Special purpose instructions also often lack explicit operands; for example, CPUID in the x86 architecture writes values into four implicit destination registers.
This distinction between explicit and implicit operands is important in code generators, especially in the register allocation and live range tracking parts.
A much more human-friendly rendition of machine language, named assembly language, uses mnemonic codes to refer to machine code instructions, rather than using the instructions' numeric values directly, and uses symbolic names to refer to storage locations and sometimes registers.
[3] For example, on the Zilog Z80 processor, the machine code 00000101, which causes the CPU to decrement the B general-purpose register, would be represented in assembly language as DEC B.
The MIPS architecture provides a specific example for a machine code whose instructions are always 32 bits long.
R-type (register) instructions include an additional field funct to determine the exact operation.
[6][9] The principle is also used in shared code sequences of fat binaries which must run on multiple instruction-set-incompatible processor platforms.
[15][6] In some computers, the machine code of the architecture is implemented by an even more fundamental underlying layer called microcode, providing a common machine language interface across a line or family of different models of computer with widely different underlying dataflows.
[16] From the point of view of the CPU, machine code is stored in RAM, but is typically also kept in a set of caches for performance reasons.
The program counter points to a memory address and is changed based on special instructions which may cause programmatic branches.
If an attempt is made to execute machine code on a non-executable page, an architecture specific fault will typically occur.
A debugger can then read the symbol table to help the programmer interactively debug the machine code in execution.