Shift Micro-Operations: Registers Computer Organisation and Architecture
Shift Micro-Operations: Registers Computer Organisation and Architecture
OPERATIONS
REGISTERS
Computer Organisation and Architecture
INTRODUCTION
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.
The contents of a register
can be shifted to the left or
the right.
In shift-left operation, the
serial input transfers a bit
into the rightmost position.
In shift-right operation, the
serial input transfers a bit
into the leftmost position.
TYPES OF SHIFT MICRO-
OPERATIONS
LOGICAL SHIFT
It transfers the 0 zero through the serial input.
LOGICAL
RIGHT SHIFT
LOGICAL
We use the symbols
LEFT SHIFT
RTL Notation :
R ← shl R
R ← shr R
LOGICAL SHIFT
Logical Left Shift Logical Right Shift
In this shift, one position moves In this shift, one position moves
each bit to the left one by one. each bit to the right one by one.
The Empty least significant bit (LSB) The least significant bit(LSB) is
is filled with zero (i.e, the serial rejected and the empty MSB is
input), and the most significant bit filled with zero.
(MSB) is rejected. Every time we shift a number
Every time we shift a number towards the right by 1 bit it divides
towards the left by 1 bit it multiplies that number by 2.
that number by 2.
ARITHMETIC SHIFT
The arithmetic shift micro-operation moves the signed binary number
either to the left or to the right position.
Following are the two ways to perform the arithmetic shift.
RTL Notation :
R ← ashl R
R ← ashr R
ARITHMETIC SHIFT
Left Arithmetic Shift Right Arithmetic Shift
In this shift, each bit is moved to In this shift, each bit is moved to
the left one by one. the right one by one and the least
The empty least significant bit significant(LSB) bit is rejected.
(LSB) is filled with zero and the The empty most significant
most significant bit (MSB) is bit(MSB) is filled with the value of
rejected. Same as the Left Logical the previous MSB.
Shift.
CIRCULAR SHIFT
The circular shift circulates the bits in the sequence of the register around
both ends without any loss of information.
Following are the two ways to perform the circular shift.
Circular Shift Left
Circular Shift Right
RTL Notation :
R ← cil R
R ← cir R
CIRCULAR SHIFT
Left Circular Shift Right Circular Shift
In this micro shift operation each In this micro shift operation each
bit in the register is shifted to the bit in the register is shifted to the
left one by one. right one by one.
After shifting, the LSB becomes After shifting, the MSB becomes
empty, so the value of the MSB is empty, so the value of the LSB is
filled in there. filled in there.
HARDWARE
IMPLEMENTATION