Obsess over every detail. Ask why it works. Ask why it isn’t built another way.

Tf is NOP?

NOP stands for No Operation.

A NOP instruction does not change registers or memory.
It simply advances the instruction pointer and consumes execution time.

In other words, the CPU executes it, but nothing observable happens.

What is NOP used for?

NOP instructions are commonly used for:

Why is NOP 0x90?

On x86, the one-byte NOP instruction (0x90) is actually encoded as:

XCHG EAX, EAX

XCHG swaps the values of two registers.
Swapping a register with itself changes nothing, so this instruction has no effect, making it a perfect NOP.

Multi-byte NOPs

Although 0x90 is the classic 1-byte NOP, Intel defines multi-byte NOP instructions (from 1 to 9 bytes long).

These are used mainly for:

They still perform no operation, just with different instruction lengths.