answersLogoWhite

0

What is a register and how is it used?

Updated: 8/21/2019
User Avatar

Wiki User

7y ago

Best Answer

In a computer a register is a device that stores a single unit of information. Some examples:

  • accumulator register - stores a word of numerical data between arithmetic operations
  • index register - stores data used in memory addressing operations
  • status register - stores information from operations that will be used in branching decisions (e.g. sign of arithmetic result, invalid arithmetic result, operation success/failure)
  • control/command register - stores mode and/or setup information for various operations
  • program status word register - combination status/control register containing all information relevant to managing the current program/process/thread (e.g. program counter, status flags, mode bits), the operating system only needs to save the current contents of this register and load it with new contents to switch tasks (on computers with this register the switch can usually be done in one instruction)
  • timer register - a register that counts at a constant rate, used to measure time intervals or trigger periodic interrupts
  • instruction register - stores the current instruction the computer is executing so it can be decoded
  • program counter register - stores the address of the next instruction to execute, as each instruction is fetched this register counts and is loaded when a branch instruction changes this default sequence
  • stack pointer register - stores the address of the top item on a Last In First Out stack stored in RAM, automatically incremented and decremented as stack contents change
  • etc.
Usually registers are implemented in dedicated hardware that is not part of RAM, but on some architectures (usually to reduce costs) some registers may be implemented in "reserved" RAM locations. On a few architectures (e.g. UNIVAC 1100) even though the registers are implemented in dedicated hardware that is not part of RAM, they "overlay" the low end of the RAM allocated to the current program making them accessible either by their register name/number or their memory address (and making those RAM locations inaccessible to that program).

We typically think of registers as being accessible to the program for software purposes, but some registers (e.g. program counter register, instruction register) are not as they have dedicated functions in the hardware that make the operation of the software possible. Other registers provide communication between hardware and software and thus may be either read only or write only registers and may change system operation if changed inappropriately.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a register and how is it used?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the value of relocation register?

what is resource allocate register why it is used


What is a corporate register used for?

A corporate register is used for maintaining a good and healthy monetary situation, and financial state for the company that the corporate register is using.


What purpose the register serve?

It used for storing bits and it can used to shift the bits from one position to another within the register or out of the register to another circuit.


What is count register purpose?

The 8085 does not have a specific "count" register. Any register can be used, in the larger context of a block of code, as a count register.


What is a pen register?

A pen register was used to record phone numbers called.


What are cash register software's used for?

Cash register software can be used as a means of looking into records and solving problems for customers in shops. They can be used at point of sale.


How is math used in stores?

cash register...profit...revenue cash register...profit...revenue


What is the format of each register used in computer and explain it?

register is internal memory inside the cpu.


Is Ax register used as destination operands?

yes it can be used


What are the different types of segment register?

The code segment (CS) register is used for access to program code. The data segment (DS) register is used for access to data. The extra segment (ES) register is used for access to data during certain string primitive operations. The stack segment (SS) register is used for access to stack data.Any of these implied uses can be overridden with a segment override prefix opcode.


Definition or function of CX register?

The CX register is a 16-bit register in the x86 architecture that is primarily used for counting operations, particularly in string manipulation and looping functions. It is part of the general-purpose registers in the CPU and can store values ranging from 0 to 65,535.


What is class register?

Register storage class is a compiler hint that the variable will be often used, and that it should generate code, if it can, to keep the variable's value in a register.