teach-ict.com logo

THE education site for computer science and ICT

2. Machine code

A CPU can only process binary data, this includes the program instructions themselves.

Therefore a typical instruction will look like this inside the CPU:

Typical Binary instruction
0 1 0 1 1 0 1 1

This is definitely not a person-friendly format. We cannot easily see what this instruction means. These binary instructions are only meant to be understood by machines such as the CPU. A program in this form is called 'machine code'.

Each type of CPU has its own list of binary numbers that it will recognise as instructions. This collection is called the instruction set of the CPU.

Machine code written to work on one type of CPU (such as the x86 microprocessors) will not work with a different CPU (such as the ARM microprocessors). This is why machine code is not portable compared to a high level language.


Instructions written in binary are called machine code.

Programming in pure machine code is possible but very difficult and time consuming.



Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: What is machine code