# What about Registers? In computer architecture, 32-bit registers are registers that can hold 32-bit (4-byte) values. These registers are used to temporarily store data that is being operated on by the CPU. The 32-bit registers are a subset of the general-purpose registers in a CPU and are used to store data that is being manipulated by the CPU. The most common use of 32-bit registers is to hold memory addresses, but they can also be used to hold data that is being operated on by the CPU. Some common 32-bit registers include: - EAX (extended accumulator register) - EBX (base register) - ECX (counter register) - EDX (data register) - EBP (base pointer register) - ESP (stack pointer register) - EIP (instruction pointer register) - EFLAGS (flags register) These registers are used by the CPU to perform various operations and are typically used in conjunction with other registers and memory locations to perform more complex operations. - Refer to Intel's Architecture Documentation for latest information: https://software.intel.com/en-us/articles/intel-sdm 64-bit registers are registers that can hold 64-bit (8-byte) values. These registers are used to temporarily store data that is being operated on by the CPU. The 64-bit registers are a subset of the general-purpose registers in a CPU and are used to store data that is being manipulated by the CPU. The most common use of 64-bit registers is to hold memory addresses, but they can also be used to hold data that is being operated on by the CPU. Some common 64-bit registers include: - RAX (register A extended) - RBX (register B extended) - RCX (register C extended) - RDX (register D extended) - RBP (base pointer register) - RSP (stack pointer register) - RIP (instruction pointer register) - RFLAGS (flags register) - R8-R15 (additional general purpose registers) These registers are used by the CPU to perform various operations and are typically used in conjunction with other registers and memory locations to perform more complex operations. It's worth noting that, the registers may differ depending on the CPU architecture or instruction set architecture (ISA) used in the computer, some architectures may have more or less registers and different names. 64-bit architecture is more common in modern processors and operating systems, as it allows more memory addressability, and faster computation. ### Additional Notes: The x64 architecture extends x86's 8 general-purpose registers to be 64-bit, and adds 8 new 64-bit registers. The 64-bit registers have names beginning with "r", so for example the 64-bit extension of **eax** is called **rax**. The lower 32 bits, 16 bits, and 8 bits of each register are directly addressable in operands. This includes registers, like **esi**, whose lower 8 bits were not previously addressable. The following table specifies the assembly-language names for the lower portions of 64-bit registers.
64-bit register | Lower 32 bits | Lower 16 bits | Lower 8 bits |
---|---|---|---|
**rax** | **eax** | **ax** | **al** |
**rbx** | **ebx** | **bx** | **bl** |
**rcx** | **ecx** | **cx** | **cl** |
**rdx** | **edx** | **dx** | **dl** |
**rsi** | **esi** | **si** | **sil** |
**rdi** | **edi** | **di** | **dil** |
**rbp** | **ebp** | **bp** | **bpl** |
**rsp** | **esp** | **sp** | **spl** |
**r8** | **r8d** | **r8w** | **r8b** |
**r9** | **r9d** | **r9w** | **r9b** |
**r10** | **r10d** | **r10w** | **r10b** |
**r11** | **r11d** | **r11w** | **r11b** |
**r12** | **r12d** | **r12w** | **r12b** |
**r13** | **r13d** | **r13w** | **r13b** |
**r14** | **r14d** | **r14w** | **r14b** |
**r15** | **r15d** | **r15w** | **r15b** |