teach-ict.com logo

THE education site for computer science and ICT

2. Machine code

A CPU follows binary instructions like this:

1010010110111010

1001110110000111

0001110010110001

These instructions are stored in memory locations called 'Registers' within the CPU. Different CPUs have a different set of registers.

The raw instructions that the CPU carries out is called 'machine code' and each CPU family has a different set of machine code.

A person would find such a list of binary instructions virtually impossible to follow. Perhaps a slightly friendlier list would be to show them as hexadecimal. like this

Machine Code

B80200

BB0400

01D8

CD20

But it is still too hard. A better way of programming had to be developed.

Another description of Machine code is 'object code'.

The movie below shows how the registers are constantly changing as software runs within the CPU.

 

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

Click on this link: Machine code