Lecture 7: Shift Microoperations | Logical Shift | Circular Shift | Arithmetic Shift

preview_player
Показать описание
#Microoperations #ShiftUnit
Shift Microoperations:
Shift micro operations are used for serial transfer of data. They are also used in conjunction with arithmetic, logic, and other data-processing operations. The contents of a register can be shifted to the left or the right.

Logical Shift:
A logical shift is one that transfers 0 through the serial input. Symbols shl and shr for logical shift-left and shift-right microoperations.
For example:
R ← Sh1 R Shift-left register R
R ← shr R Shift-right register R

Circular Shift:
The circular shift circulates the bits of the register around the two ends without loss of information. This is accomplished by connecting the serial output of the shift register to its serial input. Symbols cil and cir for the circular shift left and right, respectively.
R ← cil R Circular shift-left register R
R ← cir R Circular shift-right register R

Arithmetic Shift:
An arithmetic shift is a microoperation that shifts a signed binary number to the left or right. An arithmetic shift-left multiplies a signed binary number by 2. An arithmetic shift-right divides the number by 2.

R ← ashl R Arithmetic shift-left R
R ← ashr R Arithmetic shift-right R
Рекомендации по теме