All Topics  
Processor register

 

   Email Print
   Bookmark   Link






 

Processor register



 
 
In computer architecture
Computer architecture

Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
, a processor register is a small amount of storage
Computer storage

Computer data storage, often called storage or memory, refers to computer components, devices, and recording medium that retain digital data used for computing for some interval of time....
 available on the CPU whose contents can be accessed more quickly than storage available elsewhere. Most, but not all, modern computer architectures operate on the principle of moving data from main memory into registers, operating on them, then moving the result back into main memory—a so-called load-store architecture. A common property of computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
s is locality of reference
Locality of reference

In computer science, locality of reference, also known as the principle of locality, is the phenomenon of the same value or related computer storage locations being frequently accessed....
: the same values are often accessed repeatedly; and holding these frequently used values in registers improves program execution performance.

Processor registers are at the top of the memory hierarchy
Memory hierarchy

The hierarchical arrangement of computer storage in current computer architectures is called the memory hierarchy. It is designed to take advantage of memory locality in computer programs....
, and provide the fastest way for a CPU to access data.






Discussion
Ask a question about 'Processor register'
Start a new discussion about 'Processor register'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computer architecture
Computer architecture

Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
, a processor register is a small amount of storage
Computer storage

Computer data storage, often called storage or memory, refers to computer components, devices, and recording medium that retain digital data used for computing for some interval of time....
 available on the CPU whose contents can be accessed more quickly than storage available elsewhere. Most, but not all, modern computer architectures operate on the principle of moving data from main memory into registers, operating on them, then moving the result back into main memory—a so-called load-store architecture. A common property of computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
s is locality of reference
Locality of reference

In computer science, locality of reference, also known as the principle of locality, is the phenomenon of the same value or related computer storage locations being frequently accessed....
: the same values are often accessed repeatedly; and holding these frequently used values in registers improves program execution performance.

Processor registers are at the top of the memory hierarchy
Memory hierarchy

The hierarchical arrangement of computer storage in current computer architectures is called the memory hierarchy. It is designed to take advantage of memory locality in computer programs....
, and provide the fastest way for a CPU to access data. The term is often used to refer only to the group of registers that are directly encoded as part of an instruction, as defined by the instruction set
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
. More properly, these are called the "architectural registers". For instance, the x86 instruction set defines a set of eight 32-bit registers, but a CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
 that implements the x86 instruction set will often contain many more registers than just these eight.

Allocating frequently used variables to registers can be critical to a program's performance. This action, namely register allocation
Register allocation

In compiler optimization, register allocation is the process of multiplexing a large number of target program variables onto a small number of Central processing unit processor register....
 is performed by a compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 in the code generation phase.

Categories of registers

Registers are normally measured by the number of bit
Bit

A bit is a binary numeral system numerical digit, taking a value of either 0 or 1. Binary digits are a basic unit of information Computer data storage and transmission in digital computing and digital information theory....
s they can hold, for example, an "8-bit
8-bit

Eight-bit CPUs normally use an 8-bit data bus and a 16-bit address bus which means that their address space is limited to 64 KBs. This is not a "natural law", however, so there are exceptions....
 register" or a "32-bit
32-bit

The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295 or -2,147,483,648 through 2,147,483,647 using two's complement encoding....
 register". Registers are now usually implemented as a register file
Register file

A register file is an array of processor registers in a central processing unit. Modern integrated circuit-based register files are usually implemented by way of fast static RAMs with multiple ports....
, but they have also been implemented using individual flip-flop
Flip-flop (electronics)

In digital circuits, a flip-flop is a term referring to an electronic circuit that has two stable states and thereby is capable of serving as one bit of computer storage....
s, high speed core memory, thin film memory
Thin film memory

Thin-film memory is a high-speed variation of core memory developed by UNIVAC in a government-funded research project.Instead of threading individual ferrite cores on wires, thin-film memory consisted of 4 micrometre thick dots of permalloy, an iron-nickel alloy, deposited on small glass plates by vacuum evaporation techniques and a mask....
, and other ways in various machines.

A processor often contains several kinds of registers, that can be classified according to their content or instructions that operate on them:
  • User-accessible Registers - The most common division of user-accessible registers is into data registers and address registers.
  • Data registers are used to hold numeric values such as integer
    Integer (computer science)

    In computer science, the term integer is used to refer to a data type which represents some finite subset of the mathematical integers. These are also known as integral data types....
     and floating-point values. In some older and low end CPUs, a special data register, known as the accumulator
    Accumulator (computing)

    In a computer's central processing unit , an accumulator is a processor register in which intermediate arithmetic logic unit results are stored....
    , is used implicitly for many operations.
  • Address registers hold addresses and are used by instructions that indirectly access memory
    Computer memory

    Computer memory is usually meant to refer to the semiconductor technology that is used to store information in Electronics devices. Current primary computer memory makes use of integrated circuits consisting of silicon-based transistors....
    .
    • Some processors contain registers that may only be used to hold an address or only to hold numeric values (in some cases used as an index register
      Index register

      An index register in a computer's central processing unit is a processor register used for modifying operand addresses during the run of a program, typically for doing vector/array operations....
       whose value is added as an offset from some address); others allow registers hold either kind of quantity. A wide variety of possible addressing mode
      Addressing mode

      Addressing modes are an aspect of the instruction set architecture in most central processing unit designs. The various addressing modes that are defined in a given instruction set architecture define how Machine code Instruction in that architecture identify the operand of each instruction....
      s, used to specify the effective address of an operand
      Operand

      An operand is one of the inputs of an operator in mathematics. The following arithmetic expression shows an example of operators and operands:...
      , exist.
    • A stack pointer, sometimes called a stack register
      Stack register

      A stack register is a computer central processor register whose purpose is to keep track of a call stack. On an accumulator-based architecture machine, this may be a dedicated register such as SP on an Intel x86 machine....
      , is the name given to a register that can be used by some instructions to maintain a stack (data structure)
      Stack (data structure)

      In computer science, a stack is an abstract data type and data structure based on the principle of LIFO . Stacks are used extensively at every level of a modern computer system....
      .
  • Conditional registers hold truth values often used to determine whether some instruction should or should not be executed.
  • General purpose registers (GPRs) can store both data and addresses, i.e., they are combined Data/Address registers.
  • Floating point registers (FPRs) store floating point
    Floating point

    In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
     numbers in many architectures.
  • Constant registers hold read-only values such as zero, one, or pi
    Pi

    Pi or p is a mathematical constant whose value is the ratio of any circle's circumference to its diameter in Euclidean geometry; this is the same value as the ratio of a circle's area to the square of its radius....
    .
  • Vector registers hold data for vector processing
    Vector processor

    A vector processor, or array processor, is a Central processing unit design where the instruction set includes operations that can perform mathematical operations on multiple data elements simultaneously....
     done by SIMD
    SIMD

    In computing, SIMD is a technique employed to achieve data level parallelism....
     instructions (Single Instruction, Multiple Data).
  • Special purpose registers hold program state; they usually include the program counter
    Program counter

    The program counter, or PC is a processor register that indicates where the computer is in its instruction sequence. Depending on the details of the particular computer, the PC holds either the address of the instruction being executed, or the address of the next instruction to be executed....
     (aka instruction pointer), stack pointer
    Call stack

    In computer science, a call stack is a dynamic Stack data structure that stores information about the active subroutines of a computer program....
    , and status register
    Status register

    A status register is a collection of Flag bits for a Central processing unit. A popular example of a status register is the FLAGS register of x86 architecture based microprocessors....
     (aka processor status word). In embedded microprocessors, they can also correspond to specialised hardware elements.
    • Instruction register
      Instruction register

      In computing, an instruction register is the part of a Central_processing_unit's control unit that stores the instruction currently being executed....
      s
      store the instruction currently being executed.
  • In some architectures, model-specific registers (also called machine-specific registers) store data and settings related to the processor itself. Because their meanings are attached to the design of a specific processor, they cannot be expected to remain standard between processor generations.
  • Control and status registers - It has three types. Program counter, instruction registers, Program status word (PSW
    Program status word

    In computers, the program status word is an area of Memory or a hardware register which contains information about computer program state used by the operating system and the underlying hardware....
    ).
  • Registers related to fetching information from RAM, a collection of storage registers located on separate chips from the CPU (unlike most of the above, these are generally not architectural registers):
    • Memory buffer register
      Memory buffer register

      The Memory Buffer Register is the register in the cpu that stores the data being transferred to and from the immediate access store. It acts as a Buffer allowing the central processor and Random access memory to act independently without being affected by minor differences in operation....
    • Memory data register
      Memory data register

      The memory data register is the processor register of a computer's control unit that contains the data to be stored in the computer storage , or the data after a fetch from the computer storage....
    • Memory address register
      Memory address register

      The memory address register holds the address of the memory location where the next instruction is to be executed. While the first instruction is being executed, the address of the next memory location is held by it....
    • Memory Type Range Registers
      Memory Type Range Registers

      Memory Type Range Registers are a set of Processor Supplementary Capabilities control registers that provide system software with control of how accesses to computer storage ranges by the CPU are CPU cache....


Hardware register
Hardware register

In digital electronics, especially computing, a hardware register stores bits of information, in a way that all the bits can be written to or read out simultaneously....
s are similar, but occur outside CPUs.

Some examples

The table below shows the number of registers of several mainstream architectures. Note that the stack pointer (ESP) is counted as an integer register on x86-compatible processors, even though there are a limited number of instructions that may be used to operate on its contents. Similar caveats apply to most architectures.
ArchitectureInteger registersDouble FP registers
x8688
x86-64
X86-64

x86-64 is a superset of the x86. x86-64 Central processing units can run existing 32-bit or 16-bit x86 programs at full speed, but also support new programs written with a 64-bit address space and other additional capabilities....
1616
Itanium
Itanium

Itanium is the brand name for 64-bit Intel microprocessors that implement the Intel Itanium architecture . Intel has released two processor families using the brand: the original Itanium and the Itanium 2....
128128
UltraSPARC3232
POWER
Power

Power refers broadly to any ability to cause change or exert control over either things or people, subjects or objects....
3232
Alpha
DEC Alpha

Alpha, originally known as Alpha AXP, was a 64-bit reduced instruction set computer instruction set architecture developed by Digital Equipment Corporation , designed to replace the 32-bit VAX complex instruction set computer ISA and its implementations....
3232
6502
MOS Technology 6502

The MOS Technology 6502 is an 8-bit microprocessor that was designed by Chuck Peddle and Bill Mensch for MOS Technology in 1975. When it was introduced, it was the least expensive full-featured central processing unit on the market by a considerable margin, costing less than one-sixth the price of competing designs from larger companies such...
30
PIC microcontroller
PIC microcontroller

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division....
10
ARM
ARM architecture

The ARM architecture is a 32-bit RISC central processing unit architecture developed by ARM Limited that is widely used in embedded system designs....
 
16 16


Register usage

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

The Strahler number, or Horton-Strahler number of a binary tree is defined as follows:An empty tree has Strahler number 0.If the binary tree T has subtrees and , the Strahler number S of T is defined by:...
.

See also

  • Shift register
    Shift register

    In digital circuits, a shift register is a group of flip-flop s set up in a linear fashion which have their inputs and outputs connected together in such a way that the data is shifted down the line when the circuit is activated....
  • Register allocation
    Register allocation

    In compiler optimization, register allocation is the process of multiplexing a large number of target program variables onto a small number of Central processing unit processor register....
  • CPU Cache
    CPU cache

    A CPU cache is a cache used by the central processing unit of a computer to reduce the average time to access computer storage. The cache is a smaller, faster memory which stores copies of the data from the most frequently used main memory locations....