In computer architecture, a processor register is a small amount of storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere. In Computer engineering, computer architecture is the conceptual design and fundamental operational structure of a Computer system Computer data storage, often called storage or memory, refers to Computer components devices and recording media that retain digital 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 programs is locality of reference: the same values are often accessed repeatedly; and holding these frequently used values in registers improves program execution performance. Computer programs (also software programs, or just programs) are instructions for a Computer. In Computer science, locality of reference, also known as the principle of locality, is the phenomenon of the same value or related storage locations
Processor registers are at the top of the memory hierarchy, and provide the fastest way for a CPU to access data. The Hierarchical arrangement of storage in current Computer architectures is called the memory hierarchy. 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. An instruction set is a list of all the instructions and all their variations that a processor can execute 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 that implements the x86 instruction set will often contain many more registers than just these eight. See also X86 assembly language The generic term x86 refers to the most commercially successful Instruction set architecture in the history of Personal
Allocating frequently used variables to registers can be critical to a program's performance. This action, namely register allocation is performed by a compiler in the code generation phase. In Compiler optimization, register allocation is the process of Multiplexing a large number of target program Variables onto a small number of A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another In Computer science, code generation is the process by which a Compiler 's code generator converts some internal representation of Source code
Categories of registers
Registers are normally measured by the number of bits they can hold, for example, an "8-bit register" or a "32-bit register". A bit is a binary digit, taking a value of either 0 or 1 Binary digits are a basic unit of Information storage and communication 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 The range of Integer values that can be stored in 32 bits is 0 through 4294967295 or −2147483648 through 2147483647 using Two's complement encoding Registers are now usually implemented as a register file, but they have also been implemented using individual flip-flops, high speed core memory, thin film memory, and other ways in various machines. A register file is an array of Processor registers in a central processing unit (CPU. In Digital circuits a flip-flop is a term referring to an Electronic circuit (a Bistable Multivibrator) that has two stable states and thereby Magnetic core memory, or ferrite-core memory, is an early form of Random access Computer memory.
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 and floating-point values. 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 In some older and low end CPUs, a special data register, known as the accumulator, is used implicitly for many operations. In a Computer 's central processing unit ( CPU) an accumulator is a register in which intermediate arithmetic and logic results are stored
- Address registers hold addresses and are used by instructions that indirectly access memory.
- 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 whose value is added as an offset from some address); others allow registers hold either kind of quantity. An index register in a computer's CPU is a Processor register used for modifying Operand addresses during the run of a program typically for doing vector/ A wide variety of possible addressing modes, used to specify the effective address of an operand, exist. Addressing modes are an aspect of the Instruction set architecture in most Central processing unit (CPU designs In Mathematics, an operand is one of the inputs (arguments of an Operator.
- A stack pointer, sometimes called a stack register, is the name given to a register that can be used by some instructions to maintain a stack (data structure). In Computer science, a call stack is a dynamic stack data structure which stores information about the active Subroutines of a Computer program A stack register is a computer central Processor register whose purpose is to keep track of a Call stack. In Computer science, a stack is an Abstract data type and Data structure based on the principle of Last In First Out (LIFO
- Conditional registers hold truth values often used to determine whether some instruction should or should not be executed. In Logic and Mathematics, a logical value, also called a truth value, is a value indicating the extent to which a Proposition is true
- 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 numbers in many architectures. In Computing, floating point describes a system for numerical representation in which a string of digits (or Bits represents a Real number.
- Constant registers hold read-only values such as zero, one, or pi. IMPORTANT NOTICE Please note that Wikipedia is not a database to store the millions of digits of π please refrain from adding those to Wikipedia as it could cause technical problems
- Vector registers hold data for vector processing done by SIMD instructions (Single Instruction, Multiple Data). A vector processor, or array processor, is a CPU design where the instruction set includes operations that can perform mathematical operations on multiple data In Computing, SIMD ( S ingle I nstruction M ultiple D ata is a technique employed to achieve data level parallelism as in a Vector
- Special purpose registers hold program state; they usually include the program counter (aka instruction pointer), stack pointer, and status register (aka processor status word). The program counter, or shorter PC (also called the instruction pointer, part of the instruction sequencer in some Computers is a register in In Computer science, a call stack is a dynamic stack data structure which stores information about the active Subroutines of a Computer program A status register (also flag register or condition code register (CCR) is a collection of flag Bits for a processor.
- Instruction registers store the instruction currently being executed. In Computing, an instruction register is the part of a CPU 's Control unit that stores 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). In Computers the program status word (PSW is an area of memory or a Hardware register which contains information about program state used
- 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):
Hardware registers are similar, but occur outside CPUs. The Memory Buffer Register (MBR is the register in the central processor that stores the data being transferred to and from the immediate access store The' memory data register' (MDR is the register of a Computer 's Control unit that contains the data to be stored in the Computer storage (e The memory address register holds the address of the next memory location where the next instruction is to be executed Memory Type Range Registers (MTRRs are Control registers that provide System software with control of how accesses to memory ranges by the CPU 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
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.
See also
See also X86 assembly language The generic term x86 refers to the most commercially successful Instruction set architecture in the history of Personal x86-64 is a Superset of the x86 instruction set architecture. Itanium is the brand name for 64-bit Intel Microprocessors that implement the Intel Itanium architecture (formerly called IA-64) SPARC (from Scalable Processor Architecture is a RISC Microprocessor Instruction set architecture originally POWER is a RISC Instruction set architecture designed by IBM. Alpha, originally known as Alpha AXP, was a 64-bit Reduced instruction set computer (RISC Instruction set architecture (ISA developed The MOS Technology 6502 is an 8-bit Microprocessor that was designed by Chuck Peddle for MOS Technology in 1975 PIC is a family of Harvard architecture Microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument In Digital circuits a shift register is a group of flip flops set up in a linear fashion which have their inputs and outputs connected together in such a way that the In Compiler optimization, register allocation is the process of Multiplexing a large number of target program Variables onto a small number of
© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
network: | |