Registers

Registers

innocentzero

2026-06-15

#hardware #software #isa | Status: Complete

A bit on the registers in x86 with some historical context.

registers in x86

General Purpose Register

There are 3 types of General-purpose data registers they are:

Data registers

Data registers consists of four 32-bit data registers, which are used for arithmetic, logical and other operations.

They are mostly used for storing temporary variables during instruction execution. They are mostly meant to do arithmetic manipulation.

Data registers are again classified into 4 types they are:

Pointer registers

The pointer registers consist of 16-bit left sections (SP, and BP) and 32-bit ESP and EBP registers.

They are mostly used for storing pointers.

Index registers

The 16-bit rightmost bits of the 32-bit ESI and EDI index registers. SI and DI are sometimes employed in addition and sometimes in subtraction as well as for indexed addressing.

They are used for accessing memory segments where data needs to be read from and written to.

Special Purpose Registers

Most of them became useless and obsolete with anything greater than 16 bit registers.

To store machine state data and change state configuration, special purpose registers are employed. In other words, it is also defined as the CPU has a number of registers that are used to carry out instruction execution these registers are called special purpose registers. Special purpose registers are of 8 types they are cs, ds, ss, es, fs, and gs registers come under segment registers. These registers hold up to six segment selectors.