Microprocessor and Computer Architecture

⌘K
  1. Home
  2. Docs
  3. Microprocessor and Comput...
  4. Microoperation
  5. Shift Microoperations

Shift Microoperations

Here is the definition of Shift Microoperations

Shift micro-operations are those micro-operations that are used for the serial transfer of information.

  • These are also used in conjunction with arithmetic micro-operation, logic micro-operation, and other data-processing operations.
  • There are three types of shift micro-operations: 
Group 5
shift microoperations n e1543593021580

Logic shift transfers the 0 zero through the serial input. We use the symbols ‘<<‘ for the logical left shift and  ‘>>‘ for the logical right shift.

• The symbol “shl” and “shr” are for logic shift left and logic shift right respectively.

In Logic Shift Left, one position moves each bit to the left one by one. The Empty least significant bit (LSB) is filled with zero (i.e., the serial input), and the most significant bit (MSB) is rejected. 

Note:-  Every time we shift a number towards the left by 1 bit it multiplies that number by 2.

Screenshot 2024 03 09 200007

In Logic Right Shift, each bit moves to the right one by one and the least significant bit(LSB) is rejected and the empty MSB is filled with zero.

Note:- Every time we shift a number towards the right by 1 bit it divides that number by 2.

The arithmetic shift micro-operation moves the signed binary number either to the left or to the right position.

In Arithmetic Left shift, each bit is moved to the left one by one. The empty least significant bit (LSB) is filled with zero and the most significant bit (MSB) is rejected. Same as the Left Logical Shift.

Screenshot 2024 03 10 112012

In Arithmetic Right shift, each bit is moved to the right one by one and the least significant(LSB) bit is rejected and the empty most significant bit(MSB) is filled with the value of the previous MSB.

Screenshot 2024 03 10 112208

The circular shift circulates the bits in the sequence of the register around both ends without any loss of information. 

In this micro shift operation each bit in the register is shifted to the left one by one. After shifting, the LSB becomes empty, so the value of the MSB is filled in there.

Screenshot 2024 03 10 112652

In this Circular Shift Right each bit in the register is shifted to the right one by one. After shifting, the MSB becomes empty, so the value of the LSB is filled in there.

Screenshot 2024 03 10 112709

Shifter is a key component in executing shift microoperations. It performs the actual shifting of the bits within a binary number. Shifters can be simple or complex depending on the specific requirements of the system.

• Simple shifters may perform basic left or right shifts by one position, while more complex shifters can handle variable shift amounts, rotation, logical shifts, arithmetic shifts, and other operations.

Screenshot 2024 04 04 100703

How can we help?

Leave a Reply

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