Processor register explained

A processor register is a quickly accessible location available to a computer's processor.[1] Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-only. In computer architecture, registers are typically addressed by mechanisms other than main memory, but may in some cases be assigned a memory address e.g. DEC PDP-10, ICT 1900.[2]

Almost all computers, whether load/store architecture or not, load items of data from a larger memory into registers where they are used for arithmetic operations, bitwise operations, and other operations, and are manipulated or tested by machine instructions. Manipulated items are then often stored back to main memory, either by the same instruction or by a subsequent one. Modern processors use either static or dynamic random-access memory (RAM) as main memory, with the latter usually accessed via one or more cache levels.

Processor registers are normally at the top of the memory hierarchy, and provide the fastest way to access data. The term normally refers only to the group of registers that are directly encoded as part of an instruction, as defined by the instruction set. However, modern high-performance CPUs often have duplicates of these "architectural registers" in order to improve performance via register renaming, allowing parallel and speculative execution. Modern x86 design acquired these techniques around 1995 with the releases of Pentium Pro, Cyrix 6x86, Nx586, and AMD K5.

When a computer program accesses the same data repeatedly, this is called locality of reference. Holding frequently used values in registers can be critical to a program's performance. Register allocation is performed either by a compiler in the code generation phase, or manually by an assembly language programmer.

Size

Registers are normally measured by the number of bits they can hold, for example, an 8-bit register, 32-bit register, 64-bit register, 128-bit register, or more. In some instruction sets, the registers can operate in various modes, breaking down their storage memory into smaller parts (32-bit into four 8-bit ones, for instance) to which multiple data (vector, or one-dimensional array of data) can be loaded and operated upon at the same time. Typically it is implemented by adding extra registers that map their memory into a larger register. Processors that have the ability to execute single instructions on multiple data are called vector processors.

Types

+ Intel 8086 registers
1918171615141312111009080706050403020100(bit position)
Main registers
 AHALAX
0 0 0 0BHBLBX
 CHCLCX
 DHDLDX
Index registers
0 0 0 0SISource Index
0 0 0 0DIDestination Index
0 0 0 0BPBase Pointer
0 0 0 0SPStack Pointer
Program counter
0 0 0 0IPInstruction Pointer
Segment registers
CS0 0 0 0Code Segment
DS0 0 0 0Data Segment
ES0 0 0 0Extra Segment
SS0 0 0 0Stack Segment
Status register
 ----ODITSZ-A-P-CFlags
A processor often contains several kinds of registers, which can be classified according to the types of values they can store or the instructions that operate on them:

Hardware registers are similar, but occur outside CPUs.

In some architectures (such as SPARC and MIPS), the first or last register in the integer register file is a pseudo-register in that it is hardwired to always return zero when read (mostly to simplify indexing modes), and it cannot be overwritten. In Alpha, this is also done for the floating-point register file. As a result of this, register files are commonly quoted as having one register more than how many of them are actually usable; for example, 32 registers are quoted when only 31 of them fit within the above definition of a register.

Examples

The following table shows the number of registers in several mainstream CPU architectures. Although all of the below-listed architectures are different, almost all are in a basic arrangement known as the von Neumann architecture, first proposed by the Hungarian-American mathematician John von Neumann. It is also noteworthy that the number of registers on GPUs is much higher than that on CPUs.

Usage

The number of registers available on a processor and the operations that can be performed using those registers has a significant impact on the efficiency of code generated by optimizing compilers. The Strahler number of an expression tree gives the minimum number of registers required to evaluate that expression tree.

See also

Notes and References

  1. Web site: What is a processor register? . 2022-08-12 . Educative: Interactive Courses for Software Developers . en.
  2. Web site: A Survey of Techniques for Designing and Managing CPU Register File .
  3. Web site: Cray-1 Computer System Hardware Reference Manual . . November 1977 . 2022-12-23 . live . https://web.archive.org/web/20211107213641/http://www.bitsavers.org/pdf/cray/CRAY-1/2240004C_CRAY-1_Hardware_Reference_Nov77.pdf . 2021-11-07.
  4. Web site: MCS-4 Micro Computer Set Users Manual. live. Intel. February 1973. https://web.archive.org/web/20050224073529/http://bitsavers.org/pdf/intel/MCS4/MCS-4_UsersManual_Feb73.pdf. 2005-02-24.
  5. Web site: 8008 8 Bit Parallel Central Processor Unit Users Manual. live. Intel. November 1973. January 23, 2014. https://web.archive.org/web/20071004142917/http://bitsavers.org/pdf/intel/MCS8/8008usersManualRev4_Nov73.pdf. 2007-10-04.
  6. Web site: Intel 8080 Microcomputer Systems User's Manual. live. Intel. September 1975. January 23, 2014. https://web.archive.org/web/20101206220948/http://bitsavers.org/pdf/intel/MCS80/98-153B_Intel_8080_Microcomputer_Systems_Users_Manual_197509.pdf. 2010-12-06.
  7. Book: Z80 Family CPU User Manual . . 2016 . 3 . UM008011-0816 . January 5, 2024 . https://web.archive.org/web/20231226131929/http://www.zilog.com/docs/z80/um0080.pdf#G5.1012169 . December 26, 2023 . live.
  8. Web site: 80286 and 80287 Programmer's Reference Manual. live. Intel. 1987. https://web.archive.org/web/20150723132516/http://www.textfiles.com/bitsavers/pdf/intel/80286/210498-005_80286_and_80287_Programmers_Reference_Manual_1987.pdf. 2015-07-23.
  9. Web site: Intel 64 and IA-32 Architectures Software Developer Manuals. 4 December 2019. Intel.
  10. Web site: AMD64 Architecture Programmer's Manual Volume 1: Application Programming. AMD. October 2013.
  11. Web site: Intel Architecture Instruction Set Extensions and Future Features Programming Reference. Intel. January 2018.
  12. Book: F8, Preliminary Microprocessor User's Manual. January 1975. Fairchild.
  13. Book: F8 Guide to Programming. Fairchild MOS Microcomputer Division. 1977.
  14. Book: COP400 Microcontroller Family COPS Family User's Guide . National semiconductor . 23 June 2025.
  15. Web site: Nios II Classic Processor Reference Guide. Altera. April 2, 2015.
  16. Web site: Nios II Gen2 Processor Reference Guide. Altera. April 2, 2015.
  17. Web site: M6800 Programming Reference Manual . . November 1976. May 18, 2015. https://web.archive.org/web/20111014000206/http://bitsavers.org/pdf/motorola/6800/Motorola_M6800_Programming_Reference_Manual_M68PRM(D)_Nov76.pdf. 2011-10-14. live.
  18. Web site: Motorola M68000 Family Programmer's Reference Manual. Motorola. 1992. November 10, 2024.
  19. Web site: MSP430F552x, MSP430F551x Mixed-Signal Microcontrollers . Texas Instruments . 10 November 2025.
  20. Web site: CUDA C Programming Guide. Nvidia. 2019. Jan 9, 2020.
  21. Dissecting the NVIDIA Volta GPU Architecture via Microbenchmarking . 2018. 1804.06826. Jia. Zhe. Maggioni. Marco. Staiger. Benjamin. Scarpazza. Daniele P.. cs.DC.
  22. Book: Control Data 6000 Series Computer Systems, Reference Manual. Control Data Corporation. July 1965.
  23. Book: IBM System/360 Principles of Operation. IBM.
  24. Book: IBM System/370, Principles of Operation. IBM. September 1, 1975 .
  25. Book: z/Architecture, Principles of Operation. IBM. 2008. Seventh.
  26. Web site: IBM Enterprise Systems Architecture/370 and System/370 - Vector Operations. IBM. SA22-7125-3. May 11, 2020.
  27. Web site: IBM S/390 G5 Microprocessor.
  28. Web site: MMIX Home Page.
  29. Web site: Series 32000 Databook. National Semiconductor. https://web.archive.org/web/20171125004028/http://bitsavers.org/components/national/_dataBooks/1986_National_NS32000_dataBook.pdf. 2017-11-25. live.
  30. Book: Intel Itanium Architecture, Software Developer's Manual, Volume 3: Intel Itanium Instruction Set Reference. May 2010. Intel.
  31. Book: The SPARC Architecture Manual, Version 9. SPARC International, Inc.. Santa Clara, California. Weaver . David L. . Germond . Tom .
  32. Book: Power ISA Version 3.1B. September 14, 2021. OpenPOWER Foundation.
  33. Book: Blackfin Processor, Programming Reference, Revision 2.2. February 2013. Analog Devices.
  34. Web site: Synergistic Processor Unit Instruction Set Architecture Version 1.2. IBM. January 27, 2007.
  35. Book: VAX Architecture, Reference Manual. Timothy E.. Leonard. DEC books. 1987.
  36. Book: Alpha Architecture Reference Manual. Fourth. Compaq Computer Corporation. January 2002.
  37. Web site: Learning 65816 Assembly. Super Famicom Development Wiki. 14 November 2019.
  38. Web site: Procedure Call Standard for the ARM Architecture. ARM Holdings. 30 November 2013. 27 May 2013.
  39. Web site: 2.6.2. The Thumb-state register set. ARM7TDMI Technical Reference Manual. ARM Holdings.
  40. Book: Arm A64 Instruction Set Architecture, Armv8, for Armv8-A architecture profile. Arm. 2021.
  41. Book: MIPS64 Architecture For Programmers, Volume II: The MIPS64 Instruction Set. March 12, 2001. RISC-V Foundation. October 6, 2024.
  42. Book: The RISC-V, Instruction Set Manual, Volume I: User-Level ISA, Document Version 2.2. RISC-V Foundation. May 2017. Waterman. Andrew. Asanovi. Krste .
  43. Web site: Epiphany Architecture Reference.