Lably
Skip to content

Machine code

Instructions directly executable by a computer

  • 9 min read
  • 6 chapters
Screen shot of the output of the machine code monitor of a W65C816S single-board computer following execution of a short program (also illustrated).
BigDumbDinosaur, representing BCS Technology Limited · CC BY-SA 3.0

Related on Lably

Through Computing, Data and Code

A machine-code instruction causes the CPU to perform a specific task such as:

An instruction set architecture (ISA) defines the interface to a CPU and varies by groupings or families of CPU design such as x86 and ARM. Generally, machine code compatible with one family is not with others, but there are exceptions. The VAX architecture includes optional support of the PDP-11 instruction set. The IA-64 architecture includes optional support of the IA-32 instruction set. And, the PowerPC 615 can natively process both PowerPC and x86 instructions.

Assembly language

Assembly language provides a relatively direct mapping from a human-readable source code to machine code. The assembly language source code represents numerical codes in machine code, as mnemonics and labels. For example, NOP in assembly for an x86 processor represents the x86 architecture opcode 0x90 in machine code. While it is possible to write a program in machine code, doing so is tedious and error-prone. Therefore, programs are usually written in assembly or, more commonly, in a high-level programming language.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Computing and communication