The operation that changes the adjacent bit position
of the binary values stored in the register is known as shift microoperation.
They are used for serial transfer of data. The shift microoperation are
classified into 3 types:
1.
Logical shift: A logical shift transfer 0 through the serial input.
It can be defined in RTL by:
R←shl
R shift-left register R
R←shr R shift-right register R
1.
Circular shift: A circular shift rotates
the bit from one end of the register to another end of the register. It can be
defined in RTL by:
R←cil
R circular shift-left register R
R←cir
R circular shift-right register R
1.
Arithmetic Shift: It shifts
signed-binary number left or right. For shift left the content of the register
is multiplied by 2 whereas For shift right the content of the register is
divided by 2. The arithmetic shift must leave the sign bit unchanged. It can be
defined in RTL by:
R←ashl
R arithmetic shift-left register R
R←ashr
R arithmetic shift-right register R
was able to understand all three operations without any doubt.
ReplyDeletethanks!!!!!!!