Table of contents
1.
Introduction 
1.1.
Let’s understand the advantage of pipeline through a simple example:
1.2.
There are mainly two types of pipeline in COA. They are:
2.
What is Arithmetic Pipeline in Computer Architecture?
2.1.
1. Comparing the exponents using subtraction
2.2.
2. Aligning the mantissa
2.3.
3. Adding or subtracting the mantissa
2.4.
4. Normalizing the result
3.
Advantages of Arithmetic Pipeline
4.
Frequently Asked Questions
4.1.
What do we study in Computer Organisation and Architecture (COA) ?
4.2.
What is pipelining?
4.3.
Why do we use arithmetic pipeline?
4.4.
What is the mantissa in arithmetic pipeline?
4.5.
What is the RISC pipeline in computer architecture?
4.6.
What is the difference between Arithmetic Pipelining and Instruction Pipelining?
5.
Conclusion
Last Updated: Mar 27, 2024
Medium

Arithmetic Pipeline in Computer Architecture

Author Riya
1 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction 

In computer organisation and architecture (COA), we study about the internal workings and structure of a computer system and how the various components are organised for their efficient use. 

arithmetic pipeline in computer architecture

Pipelining is one of the techniques in COA used for decomposing a task into smaller subtasks in a pipeline manner for improving the performance of the system. In this way, subtasks are arranged in a sequential order in a pipeline, where the output of one subtask is used as input for the next subtask.In this article we will cover Arithmetic PIpeline in Computer Architecture.

Also Read - What is Booth's Algorithm in Computer Architecture?

Let’s understand the advantage of pipeline through a simple example:

Suppose the task is to take two integers as input and print their sum as output.

The system will first take the two integers as input and then compute their sum and then print it. Here, another set of two integers will wait until the sum of the previous set of integers will be printed. Also, when the system is computing the sum, the parts of the system which are taking input or printing output are left unused. In this way, the resources are not utilised efficiently.

But if we will use a pipeline, we can divide this task into following subtasks:

  1. Take input
  2. Compute sum
  3. Print the sum

And, if these three subtasks are executed parallely, we will get faster execution of the task. While the system is computing the sum of two integers, it will parallely take the next set of integers as input and print the output of the previous inputs. This way the number of tasks in a given interval of time will increase.

There are mainly two types of pipeline in COA. They are:

  1. Arithmetic Pipeline
  2. Instruction Pipeline

In this article, we will discuss the ‘Arithmetic Pipeline’ in detail.

What is Arithmetic Pipeline in Computer Architecture?

Arithmetic pipelines are used to divide an arithmetic task into subtasks to be executed in different pipeline segments. Examples of mathematical computations where arithmetic pipeline is used by computer systems are multiplication of fixed point numbers, mathematical operations on floating point numbers, etc.

Let’s understand ‘Arithmetic Pipeline’ with an example of addition of two floating point numbers.

We know that two floating point numbers are represented in their normalized form using mantissa and exponents. Mantissa represents the precision of the number and exponent represents the range.

Let the f1 and f2 be two floating point numbers whose sum is to be calculated.

f1 = x1 + 2y1

f2 = x2 + 2y2

Here x1 and x2 are mantissa of f1 and f2 respectively and y1 and y2 are exponents of f1 and f2 respectively.

In addition of two floating point numbers, following steps are used:

1. Comparing the exponents using subtraction
 

2. Aligning the mantissa
 

3. Adding or subtracting the mantissa
 

4. Normalizing the result
 

In arithmetic pipeline, these four steps are performed in four different segments to improve the speed and throughput of the system.

The figure below shows the steps performed in four different segments in an arithmetic pipeline for the addition of two floating point numbers:

addition of floating point numbers

 

Note:  Optimize the content below as highlighted in a red box  and refer to the screenshot below to get an idea:

What is Arithmetic Pipeline in Computer Architecture?

 

1. Comparing the exponents using subtraction

In an arithmetic pipeline, when performing operations on numbers in scientific notation, the exponents of the numbers are compared by subtracting one exponent from the other. This step determines the relative magnitude of the operands.

2. Aligning the mantissa

Aligning mantissas ensures corresponding bits are in the same positions for accurate arithmetic operations.

3. Adding or subtracting the mantissa

Once aligned, the pipeline adds or subtracts the mantissas based on the operation, computing the result's mantissa.

4. Normalizing the result

After the arithmetic operation, the result is normalized to ensure proper scientific notation, adjusting the mantissa and exponent for accuracy.

Also see,  what is middleware

Advantages of Arithmetic Pipeline

  • Improved throughput: Arithmetic pipelines allow multiple arithmetic operations to be executed simultaneously, leading to increased throughput and faster computation.
     
  • Reduced latency: The pipelining of arithmetic operations reduces the overall latency, making computations more efficient.
     
  • Parallelism: Pipelining enables parallel execution of arithmetic stages, utilizing hardware resources effectively.
     
  • Complex operations: It simplifies complex arithmetic operations by breaking them down into smaller, manageable stages.
     
  • Enhanced performance: Arithmetic pipelines improve modern computer architectures' overall performance.

Frequently Asked Questions

What do we study in Computer Organisation and Architecture (COA) ?

In computer Organisation and Architecture (COA), we study about the internal working and structure of a computer system and how the various components are organised for their efficient use. 

What is pipelining?

Pipelining is one of the techniques in COA used for decomposing a task into smaller subtasks performed in a sequential manner for improving the performance of the system.

Why do we use arithmetic pipeline?

Arithmetic pipelines improve computational efficiency by breaking down tasks into smaller stages, allowing concurrent execution of multiple instructions.

What is the mantissa in arithmetic pipeline?

In an arithmetic pipeline, the mantissa represents the fractional part of a floating-point number, crucial for accurate arithmetic operations.

What is the RISC pipeline in computer architecture?

RISC pipeline in computer architecture refers to a processor design emphasizing simplicity and efficiency by executing instructions in stages, minimizing complexity.

What is the difference between Arithmetic Pipelining and Instruction Pipelining?

Arithmetic pipelining focuses on breaking down arithmetic operations into stages for parallel execution. Instruction pipelining involves breaking down instruction processing into stages for sequential execution in a CPU.

Conclusion

In this article, we learned about the iArithmetic PIpeline in Computer Architecture., why they are used, and how they work. If you want to learn more about such topics, you can visit Coding Ninjas Studio.

Recommended Articles:

Also check out the Interview guide for Product Based Companies as well as some of the Popular interview problems from top tech companies like Amazon, Adobe, Google, Uber, Microsoft, etc.

Refer to our guided pathways on Code studio to learn more about DSACompetitive ProgrammingJavaScriptSystem Design, etc. Enroll in our courses, and use the accessible sample exams and questions as a guide. For placement preparations, look at the interview experiences and interview package

Live masterclass