Table of contents
1.
Introduction
2.
Arithmetic Logic Shift Unit
3.
One Stage of Arithmetic Logic Shift Unit
4.
FAQs
5.
Key Takeaways
Last Updated: Mar 27, 2024
Easy

Arithmetic Logic Shift Unit

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

Introduction

As we all know, microoperations in digital computers are ArithmeticLogic, and shift micro-operations. These all microoperations are performed on digital circuits. If the individual circuit has to be designed for each micro-operation, it will be difficult to manufacture and manage different circuits simultaneously. It will also increase the cost of manufacturing. Due to all these reasons, all the micro-operations are integrated into one circuit, ALSU, which is our discussion for today. 

Computer systems have several storage registers connected to a common operational unit called an Arithmetic Logic Unit, ALU

To perform a micro-operation, the contents of specified registers are placed in the inputs of the common ALU. The ALU performs operations, and results are transferred to the destination register. In ALU, the entire register transfer operation from the source registers to the destination registers can be performed during one clock pulse period.

The shift micro-operations are often overall in a separate unit, but sometimes the shift unit is made part of the overall ALU too; this unit is called Arithmetic Logic Shift Unit.

Read About - Shift Registers in Digital Electronics

Arithmetic Logic Shift Unit

The Arithmetic Logic Shift Unit(ALSU) is part of a computer system's Arithmetic Logic Unit(ALU). It can be defined as a digital circuit that performs arithmetic, logical, and shift operations. Instead of having individual registers performing microoperations directly, computer systems employ many storage registers connected to a common operational unit ALU.

The major characteristic of ALSU is to perform all the logical, arithmetic, and shift operations. Operations like addition, subtraction, multiplication, and division are called arithmetic operations. Logical operation refers to operation on numbers and special character operations, and it connects two or more phrases of information(expressions). Shift micro-operations are operations for serial transfer of information.

One Stage of Arithmetic Logic Shift Unit

The arithmetic, logic, and shift circuits are combined to one ALU with common selection variables. The diagram below shows one stage of an arithmetic logic shift unit. The subscript i designates a typical stage. 

                            

                                                One Stage of Arithmetic Logic Shift Unit

With inputs S1 and S0, a specific microoperation is chosen. At the output, a 4 x 1 multiplexer selects between an arithmetic output and a logic output. Inputs S3 and S2 select the data in the multiplexer. The multiplexer's other two data inputs receive inputs Ai — 1 for the shift-right operation(shr) and Ai + 1 for the shift-left operation (shl).

It should be noted that the circuit diagram only depicts one typical stage. For an n-bit ALU, the circuit shown above must be repeated n times. The output that carries Ci+1 of a given arithmetic stage must be connected to the input carry Ci of the next stage in the sequence. The input carried to the first stage is the input carry Cin, which provides a selection variable for the arithmetic operations.

The circuit whose one stage is specified in the diagram given above provides eight arithmetic, four logical, and two-shift operations. Each operation is selected with five variables S3, S2, S1, S0, and Cin. Here Cin is used for selecting an arithmetic operation only. The table given below is the function table of the Arithmetic Logic Shift Unit.

S3

S2

S1

S0

Cin

Operation

Function

0 0 0 0 0 F = A Transfer A
0 0 0 0 1 F = A + 1 Increment A
0 0 0 1 0 F = A + B Addition
0 0 0 1 1 F = A + B + 1 Add with carry
0 0 1 0 0 F = A + B’ Subtract with borrow
0 0 1 0 1 F = A + B’ + 1 Subtraction
0 0 1 1 0 F = A – 1 Decrement A
0 0 1 1 1 F = A Transfer A
0 1 0 0 X F = A âˆ§ B AND
0 1 0 1 X F = A âˆ¨ B OR
0 1 1 0 X F = A âŠ• B XOR
0 1 1 1 X F = A’ Complement A
1 0 X X X F = shr A Shift right A into F
1 1 X X X F = shl A Shift Left A into F

The above table shows 14 operations of ALU(Arithmetic Logical Unit). 

  1. The first eight are arithmetic operations( where S3S2=0). 
  2. The next four operations are logical and are selected with S3S2=01. 
  3. The final two operations are shift operations, selected with S3S2=10 and 11. 
    Must Read Repeater in Computer Network

FAQs

  1. What is the functional difference between ALU and CU?
    Arithmetic Logic Unit(ALU) is a processor component that performs arithmetic, logical, and shifts operations while the Control Unit(CU) directs and coordinates most of the operations in the computer.
     
  2. What are shift micro-operations?
    Shift micro-operations are those micro-operations used for the serial transfer of information. These can also be used with arithmetic micro-operations, logic micro-operations, and other data processing operations.
     
  3. What is an arithmetic pipeline in computer architecture?
    Pipeline arithmetic units are generally discovered in very large-speed computers, and they can execute floating-point operations multiplication of fixed-point numbers.
     
  4. What is a computer register?
    Computer registers are the elements of a computer processor and are high-speed memory storing units. They carry any type of information, including bit sequence or single-bit data.
     
  5. What do you mean by logical operations?
    A logical operation is one in which a decision is made as to whether the operation performed is TRUE or FALSE. It connects two or more phrases of information(expressions).

Key Takeaways

In this article, we have extensively discussed the Arithmetic Logic Unit and its shift unit(ALSU). We saw the circuit diagram of ALU with its arithmetic, logic, and shift circuits operations, and their functions.

To learn more about Micro Operations, refer to Arithmetic Micro Operations, Instruction Format in Computer Architecture

We hope that this blog has helped you enhance your knowledge regarding ALSU, and if you would like to learn more, check out our articles Register in Computer and Classification of Computers. Do upvote our blog to help other ninjas grow. 

Happy Learning!

Live masterclass