Binary-like code on a screen, representing machine code.

The raw numeric instructions a processor directly executes.

What machine code is

Machine code is the lowest-level form of a computer program: the raw numeric instructions that a processor directly understands and executes. Everything a computer does ultimately comes down to the processor carrying out a long sequence of these simple instructions. Unlike the text of a programming language, machine code is pure numbers, encoded in a form the hardware is built to interpret. It is the language the processor itself actually speaks.

Instructions the processor understands

A processor is designed to recognize a specific set of instructions, each represented by a particular pattern of numbers. These instructions are very basic - things like moving a value, adding two numbers, or jumping to another part of the program. Machine code is simply a sequence of these encoded instructions. When the processor runs a program, it reads these instructions one after another and performs exactly the simple operation each one specifies.

Machine code and the processor

Machine code is tied to the specific type of processor it runs on, because each processor family has its own set of instructions and its own way of encoding them. Code written for one kind of processor generally will not run on a different kind. This is why software often has to be built separately for different types of hardware: the machine code that one processor understands is not the same as what another understands.

How programs become machine code

People rarely write machine code directly, because working with raw numbers is tedious and error-prone. Instead, programmers write in higher-level languages or in assembly language, and these are translated into machine code by tools such as compilers and assemblers. The result of that translation is the machine code that the processor actually executes. In this way, human-friendly code is turned into the numeric instructions the hardware requires.

Machine code versus assembly

Machine code is closely related to assembly language, but they are not the same. Assembly language is a human-readable representation that uses short names for instructions, while machine code is the raw numeric form the processor executes. An assembler translates assembly into machine code, with a nearly one-to-one correspondence between them. Assembly makes the same low-level instructions understandable to people, but it is machine code that the hardware ultimately runs.

Why it matters

Machine code is the bedrock beneath all software, the actual instructions a processor carries out. Understanding what machine code is - the raw numeric instructions a processor directly executes - reveals what all our programming languages and tools are ultimately producing. For anyone curious about how computers really work, or how the code we write becomes action in hardware, machine code is a foundational and illuminating concept.

See also: What is assembly language? Explained, What is a compiler vs interpreter?.

Sources

Published date reflects the original event date (2023-07-04). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.

Skillo Staff

Skillo Staff

All stories by: Skillo Staff

Leave a Reply