Open main menu

CDOT Wiki β

Changes

Register

1,003 bytes added, 12:13, 8 January 2014
no edit summary
[[Category:Computer Architecture]]A register is a high-speed memory location within a CPU.
 == Common Types of CPU Registers ==Various types of registers are used in combination in various computer architecturesarchitecture:* '''=== General-purpose registers''' are used ===Used to temporarily store values. Most modern architectures have several dozen general-purpose registers.* '''Accumulators''' === Accumulator ===A special designation of general-purpose register, used to hold the results of mathematical operations (originally add/subtracts, but now any numerical operation).* === Status Register ===A '''Status registers'status register'' (or Flag registersregister, or Condition code registersregister) contain flag bits, which are set/cleared/tested either explicitly (by instructions) or implicitly (as the result of other operations). For example, the ARM aarch32 "Z" flag is set ("1") if an operation has a non-zero result, and cleared ("0") if an operation has a non-zero result. This flag is one bit within the Application Processor Status Register (APSR).* '=== Control Registers ===''Control registers''' alter the operation of the processor, such as by enabling binary coded decimal (BCD) math or toggling [[Endian|little-endian/big-endian]] mode. === Stack Pointer ===A ''stack pointer'' is a register used for indirect access to the ''stack'', and is automatically incremented or decremented on each access. === Program Counter ===The ''program counter'' keeps track of the address of the currently-executing instruction. A jump is performed by writing the destination address to the program counter. A subroutine (function) call is performed by pushing the program counter onto the [[Stack|stack]] and then writing the subroutine address to the program counter. Upon completion of the subroutine, the return address is popped from the stack and written to the program counter. Relative [[Addressing Mode|addressing modes]] add a signed value to the program counter to calculate the effective address. == Other Uses of the Term "Register" ==
The term ''register'' may also be used to refer to an IO port or a memory address within a memory-mapped input/output device, used to set/read device status and parameters.