Machine Code
Learn about machine code, the native language of a computer, with an example.
We'll cover the following...
Machine code
Now that we have circuits that can perform some basic operations on numbers, and we have data in the form of numbers, we can start to write programs that will perform operations on the data. We can do that with the only thing the computer understands: machine code. Because numbers can represent everything, the instructions we give to the computer will be, yes, that’s right, just numbers.
Instruction set and assembly code
Each processor type has a specific set of instructions. A program written for a Mac can’t run on a PC running Windows. So, the instructions can be machine code. Machine code has several operations, called opcodes. The operations can be defined as AND, OR, ADD, and so on. Each opcode has a unique number. For example, AND could have an opcode value of 1, and OR could have an opcode value of 9.
The processor will also have several registers. A register is a small ...