Shift micro-operations are those micro-operations that are used for 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 shifts micro-operations:
1. Logical :
It transfers the 0 zero through the serial input. We use the symbols shl for logical shift-left and shr for shift-right.
- Logical Shift Left –
In this shift 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.
- Right Logical Shift –
In this one position moves each bit to the right one by one and the least significant bit(LSB) is rejected and the empty MSB is filled with zero.
2. Arithmetic :
This micro-operation shifts a signed binary number to the left or to the right position. In an arithmetic shift-left, it multiplies a signed binary number by 2 and In an arithmetic shift-right, it divides the number by 2.
- Left Arithmetic Shift –
In this one position moves each bit 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.
- Right Arithmetic Shift –
In this one position moves each bit to the right one by one and the least significant bit is rejected and the empty MSB is filled with the value of the previous MSB.
3. Circular :
The circular shift circulates the bits in the sequence of the register around the both ends without any loss of information.
- Left Circular Shift –
- Right Circular Shift –
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Computer Organization and Architecture | Computer Organization and Architecture | Question 1
- Differences between Computer Architecture and Computer Organization
- Computer Organization and Architecture | Pipelining | Set 1 (Execution, Stages and Throughput)
- Computer Organization and Architecture | Pipelining | Set 3 (Types and Stalling)
- Computer Organization and Architecture | Pipelining | Set 2 (Dependencies and Data Hazard)
- Computer Architecture | Flynn's taxonomy
- Computer Organization | Von Neumann architecture
- Memory Organisation in Computer Architecture
- Bottom Up or Shift Reduce Parsers | Set 2
- Shift Registers in Digital Logic
- Shift Reduce Parser in Compiler
- Universal Shift Register in Digital logic
- Computer Organization | Basic Computer Instructions
- Computer Organization | Performance of Computer
- DBMS Architecture 2-Level, 3-Level
- Hardware architecture (parallel computing)
- Microarchitecture and Instruction Set Architecture
- Architecture of 8086
- UltraSPARC Architecture
- SIC/XE Architecture
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.