Introduction to Register

What is Register?

Introduction to Register

Computers have become part of our life and today in the digital world the children are born with mobile phones and it is the first toy for them to play with. More than half of our population work with computers without understanding the basic parts of it and how it works. A computer consists of 3 basic components viz., a central processing unit (CPU), Memory to temporarily store results and  Storage to store data permanently. CPU in turn contains three main components namely a. The arithmetic logic unit, b. Control unit and c. Register Memory. Central Processing Unit (CPU) is the heart of a computer and it executes program codes, does arithmetic calculations, logical comparison as instructed and store the final outcome in storage. It takes data and executable instructions from the main memory and processes it. While doing so it needs some working space to store intermediate results and special instructions and the stored values should be retrievable faster. Register does this function effectively and let’s study this in detail in this article.

Types of Registers

Before getting into let’s understand the functionalities first.

1. Functions of Register

It is typically a tiny memory unit, not part of the main memory of the computer (Random Access Memory (RAM) or Read-only Memory (ROM)) resides in the CPU. They are positioned in the computer hierarchy a level above main memory. Control Unit of the computer takes the data from the disk storage (Secondary storage) and Program codes from the library and stores the relevant instruction and data in the main memory and instructs CPU to process it. CPU is the brain of the computer that processes the instruction and data and delivers the result.

The process may involve multiple steps and the results of the intermediate steps and other parameters like address, data will have to be stored in memory units for smooth continuity. The main memory of the computer cannot fulfill this requirement as the speed of storing and retrieval is not fast. Register memory fills the gap and provides faster storage and retrieval of the contents.

They store data, address, and instructions with a size of 32 bits to 64 bits and the power of the CPU is determined by the number of Registers and its size. The big-sized can be split into smaller sized units to hold multiple data. One dimensional array or vector can be operated simultaneously using these register and such processors are called vector processors. There are different types that are categorized by its contents, instructions, and uses. Some of the categories are accumulating values, data storage, Address storage, next Instruction, etc.

Registers can be grouped functionally under 2 groups:

  1. Registers Accessible by Users: Contents in these can be altered by the instructions in the flow of program execution e.g Data and address Register.
  2. Internal Registers: Used exclusively by CPU for internal operations and these are not accessible by instructions.

2. User Accessible Registers

  • Data Registers (DR): It holds variables used by the processor in the execution of instructions and in a transition state between the processor and peripheral devices. Its size is 16 bits and stores an integer, floating-point values, Characters and array of elements small in size.
  • Accumulator Registers (AC): It holds the results of any operation until it is consumed in the next operation by CPU. Its size is 16 bits.
  • Address Registers (AR): It holds the address of the main memory that holds data or instructions. It may hold the exact absolute address or offset value in numeric format and both the options exist in processors.
  • Program Counter (PC): Address of the main memory location which contains an instruction that has to be executed next after completing the current instruction, is stored in this register. It helps to maintain a flow in the execution of a program instruction after instruction in the right sequence. It can also be called an instruction pointer.
  • General Purpose Register (GPR): It stores addresses as well as data and it is known as integrated registers of both address and data. It has got the capability to store floating-point numbers as well.
  • Floating-point Registers (FPR): It stores Floating point numbers.
  • Vector Registers: It holds data of SIMD (Single instruction and multiple data) instructions.
  • Constant Registers: It holds constant values like pi, zero and one.
  • Status Registers: It holds true or false values that decide the execution of a statement.

3. Internal Registers

  • Instruction Register (IR): It holds the current instruction that is executed currently. This instruction would have been fetched from the main memory. Its size is 16 bit. CPU, as instructed by the control unit, will execute this instruction after decoding.
  • Memory Buffer Register (MBR): It holds the content of the memory that is transferred between the main memory and another component in both the direction and it is two-way registers.
  • Memory Address Registers (MAR): It stores the address of the memory from where the data will have to be fetched to the CPU for processing.

4. Other Registers

  • Architectural: Defined by Architecture are visible to software and it is pseudo registers.
  • Hardware: These are not part of the CPU and they are present outside.

Importance of Registers

It plays a critical role in storing instructions, addresses, data, and results in tiny quickly retrievable memory units and enhance the program execution speed. Though each has a specific function to perform, they are easily accessible to CPU, Memory and other components of computers and the storing contents into and out of these registers are pretty fast.

Advantages:

  • It provides faster access to data, instruction, and addresses stored in it for CPU.
  • It handles the storing/retrieving variables accessed repeatedly.
  • It helps in enhancing program performance significantly.
  • Optimized utilization of memory while executing the program.

Recommended Articles

This is a guide to What is Register?. Here we discuss the definition of Register and its different types along with the advantages and importance. You can also go through our other suggested articles to learn more –

  1. What is Scala?
  2. Scala Versions
  3. Scala Data Types
  4. Ansible Register

ALL IN ONE SOFTWARE DEVELOPMENT BUNDLE (600+ COURSES, 50+ PROJECTS) Popular Course in this categoryAll in One Software Development Bundle (600+ Courses, 50+ projects)600+ Online Courses | 3000+ Hours | Verifiable Certificates | Lifetime Access
4.6 (3,144 ratings)Course Price
₹8999 ₹125000
View Course


Related CoursesWindows 10 Training (4 Courses, 4+ Projects)JWS Java Web Services Training (4 Courses, 11 Projects)Java Training (40 Courses, 29 Projects, 4 Quizzes)

 600+ Online Courses

 3000+ Hours

 Verifiable Certificates

 Lifetime Access

Learn More0SHARESShareTweetShare

Leave a Comment

Your email address will not be published. Required fields are marked *