1,885
edits
Changes
Register
,no edit summary
== Common Types of CPU Registers ==
Various types of registers are used in combination in computer architecture. The set of all registers present in a processor is called the ''Register Set'' or ''Register File''. The types of registers present will vary by processor family, but in general consist of some combination of:
=== General-purpose registers ===
Used to temporarily store values. Most modern architectures have several dozen general-purpose registers.
==== Accumulator ====
A special designation of general-purpose register, used to hold the results of mathematical operations (originally add/subtracts, but now any numerical operation).
==== Index Register ====
A special designation of general-purpose register, used to hold an index (offset) into an array or memory space.
=== Status Register ===
A ''status register'' (or ''Flag register'', or ''Condition code register'') contain flag [[Word#Bit|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'' contain multiple bits which alter some aspect of the operation of the processor, such as by enabling binary coded decimal ([[BCD]]) math or toggling [[Endian|little-endian/big-endian]] mode.
=== Stack Pointer ===