# Machine Code

> The raw steps a chip runs on its own. Compilers make it for you.

**Field:** Software Development  
**Category:** Compilers & Runtimes  
**Also known as:** Machine Language, Native Code, Binary Code

## Think of it like

Think of it like the holes in a music box drum. The box plays them, but people cannot read the tune from them.

## Definition

Machine code is the set of simple steps a computer's chip runs directly. Each step is a number, like add two values or jump to another step. Every chip family has its own, so code made for one may not run on another. People almost never write it by hand. A compiler makes it from code written in a language people can read.

## Example

A phone chip and a laptop chip speak different machine code. That is why one app file cannot run on both.

## Example code

```console
$ objdump -d add.o
0000000000000000 <add>:
   0:	f3 0f 1e fa   endbr64
   4:	8d 04 37      lea    (%rdi,%rsi,1),%eax
   7:	c3            ret
```

The pairs of letters and digits are the machine code. The words beside them are a readable version.

## Why it matters

All software ends up as machine code in the end. It is why a program built for one chip may not run on another.

## Common mistake

Thinking source code is what the computer runs. It always has to be turned into machine code first.

## Three principles

- **Chip's own steps.** The chip runs it with no help.
- **One per chip family.** Code for one chip may not fit another.
- **Made, not written.** Compilers write it, not people.

## Related terms

- [Compiler](https://learn.benibix.com/term/development/compiler)
- [Bytecode](https://learn.benibix.com/term/development/bytecode)
- [Low-Level Language](https://learn.benibix.com/term/development/low-level-language)
- [Byte](https://learn.benibix.com/term/development/byte)
- [CPU Architecture](https://learn.benibix.com/term/development/cpu-architecture)
- [Executable File](https://learn.benibix.com/term/development/executable-file)

## Told apart from

- [Bytecode vs Machine Code](https://learn.benibix.com/compare/bytecode-vs-machine-code): People think bytecode is machine code, and it is not. Machine code is the steps a chip runs directly, so it only works on one chip family. Bytecode is a list of simpler steps for a virtual machine, which a program reads and runs. That makes it work on any chip that has the virtual machine. Python, Java and C# all make bytecode first.

---

Source: https://learn.benibix.com/term/development/machine-code
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
