Home » Computer Science Organization

Computer Science Organization | Registers



In this article, we are going to learn about the registers and different types of registers in computer system organization.
Submitted by Prerana Jain, on July 05, 2018

Computer Register

This is a part of the central processing unit, reside inside the CPU. The information from main memory is brought to CPU and keeps the information in register due to space and cost constraints, there is the limited number of registers in a CPU.

The registers in the processor performs two rules:

1) User-visible register

The user-visible registers are those which enables the machine or assembly language programmer to minimize the main memory references by the operating system.

i) General purpose register

  • It can be assigned to a variety of functions by the programmer.
  • Sometimes their use within the instruction set is orthogonal (right angle )to the operations.
  • The general purpose register can contain the operand for any opcode.
  • This provides true general purpose register use.
  • However, there are restrictions.
  • For example, there may be dedicated register for floating point and stack operations.
  • In some cases, general purpose register can be used for addressing functions (e.g register indirect, displacement).

ii) Data register

It is used only to hold data and cannot be employed in the calculation of an operand address.

iii) Address register

They may be somewhat general purpose or they may be devoted to a particular addressing mode.

Examples include the following,

  1. Segment pointers: In a machine with segmented addressing a segment register to hold the address of the base of the segment.
  2. Index register: These are used for indexed addressing and maybe auto indexed.
  3. Stack pointer: There is some user-visible stack addressing registers which basically points to the top of the stack. This allows implicit addressing that is pushed, pop and other stack instruction need not contain an explicit stack operand.
  4. Condition code: Condition codes are Partially visible to the user holds conditions(also referred to as flag). Condition codes are what types of bits which is set by the processor hardware as the result of operations. For example, arithmetic operations may produce a positive, negative zero, or overflow result.

2) Control and status register

The control register is used by the control units to control the operations of the processor and the status register are used to check the status of the register.

Most of the machine these registers are not visible to the users. But some of the registers are visible to machine instructions which are executed in a control operating system mode.

Four registers are essential to instructions execution,

  1. Program Counter (PC): It is a type of register that contains the address of an instruction to be fetched.
  2. Instruction register (IR): It is a type of register that contains the instruction most recently fetched.
  3. Memory address register (MAR): It is a type of register that contains the address of a location in memory.
  4. Memory buffer register (MBR): It is a type of register that contains a word of data to be written to memory or the word most recently read.

Reference: Introduction to CPU






Quick links:
C FAQ(s) C Advance programs C/C++ Tips & Tricks Puzzles JavaScript CSS Python Linux Commands PHP Android Articles More...

Was this page helpful? Please share with your friends...

Are you a blogger? Join our Blogging forum.



Comments and Discussions





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com (2015-2018), Some rights reserved.