Overview

Machine code is a string of bytes that a CPU runs. All other programming languages are "compiled" into machine code before it is run on a specific machine. All programming languages that run on a computer must ultimately be rendered into machine code before the computer can execute it. This happens automatically behind the scenes so most people are unaware that it happens. But it must happen. If it is possible to do something with a computer, then it is equally possible to do it with machine code. There is nothing that another language can do that machine code cannot do, but the reverse is not always true.

There have been much evolution in this strategy in recent decades. Generally:

Assembly language is a human readable programming language that maps one-for-one with a specific CPU's machine code.

Most programmers do not write in assembly language today. The high-level compilers, like C, C++, and Rust are so good that they often created faster, smaller machine code than the programmers can do with assembly language. And assembly language is an attractor to bugs.

Still, this page is a discussion of this subject because there are still good reasons to understand how this works:

Details

For a general example of machine code, see the COSMAC ELF page, where you program the computer by flipping toggle switches to enter the machine code bytes.

References

Books:

Sites:

Videos:

Courses: