Typically, that code is compiled into a format the computer can run.

Computers cant understand python, C, Java, or any other programming language.

It needs any instructions to be provided in the format of its instruction set.

codes

The instruction set is a collection of computer instructions.

Each detail what operation is to be performed and on what data.

The most common computer instruction set is x86.

Specifically, the x86-64 variant is also referred to as AMD64.

Arithmetic, logical, and shift instructions.

Instructions to move data between system memory and the registers.

Input and output instructions.

Program control and status instructions.

Arithmetic, logical, and shift instructions allow the computer to perform computations.

This subset of instructions is used to perform actual computations.

All the data the CPU needs to operate on is stored in RAM.

For the CPU to be able to access it to operate on it.

However, the data must be in the processor registers.

As such, instructions that move data between RAM and the registers are critical to performance.

While computers do many things, there is typically some human interaction.

Capturing these interactions and dealing with them is critical in keeping computers interactive.

These are known as branch instructions and are necessary for complex programming, including for and while loops.

Control instructions are also core to ensuring that operations take place in the correct order.

What Is an Instruction?

An instruction is a defined piece of functionality that a processor can execute.

An operation is typically displayed with a short form instruction name.

The actual instruction is encoded as a short opcode.

Many operations need to perform their operation on some data.

The address information for this data is known as operands.

The most basic operation is generally known as NOP.

NOP is short for no operation.

NOP doesnt require any further operands as it instructs the CPU to sit idle for one clock cycle.

In x86, NOP is encoded as 0x90.

JMP is another operation.

It adjusts the program counter that points to the next instruction.

Generally, the next instruction to be executed is the next instruction in the list.

However, this cant be true for both cases when you get to a branching statement.

In x86, JMP is encoded as 0xE9…0xEB, 0xFF/4 and 0xFF/5.

Instructions detail the exact operations for a processor to complete.

Most, but not all, need to operate on data and are called alongside operands.

These operands point to registers that contain the data to be operated on.