A register is a portable, efficient place on a personal computer that can be used to store information. All personal computers come with at least one register for numerical purposes, such as the date, time, or temperature. Other computers may include a word processor register, a memory register, or an address register. Some registers can also be read only or write-protected, and are usually limited in the types of data that they can store, but all of these types of registers can be combined into one register. The register is the most used piece of hardware in a personal computer.
A data register, on the other hand, is a machine that keeps track of the contents of a specific data structure. Most registers contain a small amount of random access memory (RAM), and typically a program code for processing instructions. Some registers may also have some special hardware functions, such as an address register, and can be read or write-protected, but all registers are used for numeric purposes.
A register is divided into two parts: an input register and an output register. The input register acts as a connection point between an instruction and the hardware. When a instruction is requested from the CPU, the appropriate register is fetched from the RAM and converted into an instruction word. Output registers are connected to the rest of the CPU and determine what output is to be produced when the instruction is executed. In a multithreaded application, input and output registers can be interchanged, allowing the CPU to execute more than one task at the same time.
In a register machine, instructions are executed by the CPU (Central Processing Unit) through a series of counters that increment each time the instruction is requested from the CPU. The actual execution of instructions inside the CPU happens in an ARM core, which stands for ARM Instruction Register. The ARM core is a group of microprocessor transistors controlled by the central processor through a series of gates. The execution of the instruction occurs at each microprocessor gate. Instructions that come from external sources are then translated by the ARM core into an internal register that contains the data that was specified by the external source.
The difference between an execution register and an internal register is that an execution register is used to control an executing device directly, while an internal register is used internally to control the execution of commands entered by software or executed within the CPU. For example, the pc register executes a instruction within the xyz instruction set within the CPU, and an interrupt will be generated if the pc register is modified by the user code. Thus, the two registers will generate an interrupt signal that will stop the program being executed. If the interrupts are caused by two different sources, then the two registers will generate two interrupt signals, resulting in an invalid state for the xyz instruction and an invalid state for the pc register.
Allocating registers to control different devices is done through the instruction set and an instruction pointer. The instruction pointer is contained within the register that is used for controlling execution of instructions. Instructions within the program will control the execution of one register. An example of this is the bORT instruction which is used to give a B register an unconditional jump to another register. A register can also become invalid if an instruction is not properly executed or a bad link occurs between the software and the hardware, thus resulting to invalid state for the register.