## Shift Micro Operations

**Shift micro operations** are those

*that are used for*

__micro operations__*of information.*

__serial transmission__
*Shift micro operation* are also used in combination with arithmetical,
logical, and other

*data processing tasks*.

In **shift micro operation** The contents of a

*register can be shifted left or right*.

As the bits are shiftted, the first flip-flop gets its **binary information**
through the serial input.

The serial input is slightly shifted to the rightmost position during
**shift-left operation**.

The serial input is shifted slightly to the leftmost position during
**shift-right operation**.

## Types of shift micro operations

The information transferred from a serial input determines the type of shift.
In *shift micro operation* There are three

*.*

**types of shifts**- Logical shift
- The Circular Shift
- Arithmetic shift operation

## Logical shift

A *logical shift* is one which moves zero through the serial input. The
shl symbol is used for

**and the shr symbol is used for**

__logical shift-left__

__shift-right__There are two ways to move zero in __logical shift.__

- Logical Shift Left
- Right Logical Shift

### Logical Shift Left

In the *Logical shift left* single (1) position through single (1)
moves every bit to the left. The least significant bit (LSB) is filled with
zeros (ie - serial input), and the most significant bit (MSB) is discarded.

shl symbol is used for __logical shift left.__

We can easily understand this by the example given below

R1 ← shl R1

There are an ** microoperations** that define a

**to the left of the contents of register R1**

*1-bit shift*
The bit shifted to the last position via the **serial input** is assumed to be 0
during a *logical shift*.

The register sign should be the same on both sides of the arrow.

## Logical Shift Right

In *logical shift right* one position moves each bit one by one to the
right and the least significant bit (LSB) is discarded and the empty MSB is
filled with zeros.

shr symbol is used for __logical shift right.__

We can easily understand this by the example given below

R2 ← shr R2

There are an ** microoperations** that specify a

*to the right of the contents of register R2.*

**1-bit shift**
The **bit shifted** to the last position via the **serial input** is assumed to be 0
during a **logical shift**.

The register sign should be the same on both sides of the arrow.

## The circular shift

The **circular shift** transmits the bits in the order of the
register around both ends without any loss of information.

The *Circular Shift* is also known as

*.*__Rotate Operation__*
Circular shift* is complished via connecting a

**serial output**of the

**to its**

__shift register__*.*

__serial input__There are two types of __circular shift operation__

- Left circular Shift
- Right circular Shift

### Left circular Shift

We will use the symbol cil for the *circular shift* to the left.

cil symbol is used for __Left circular Shift.__

We can easily understand this by the example given below

R1 ← cil R1

### Right circular Shift

cir symbol is used for ** Right circular Shift**.

We can easily understand this by the example given below

R2 ← cir R2.

## Arithmetic shift operation

*Arithmetic shift operation* is the

**which shifts a**

__type of shift micro operation__**to the right or left.**

*signed binary number*
An **arithmetic shift-left** multiplies a signed binary number by
2.

An **arithmetic shift-right** divides the number by two (2).

There are two types of __arithmetic shift operation.__

- Left Arithmetic Shift
- Right Arithmetic Shift

### Left Arithmetic Shift

In this one position moves each bit one by one to the left. Similar to *Left Logical Shift*.

ashl symbol is used for __Left Arithmetic Shift.__

We can easily understand this by the example given below

R1 ← ashl R1.

### Right Arithmetic Shift

In this a position is moved each bit one by one to the right and the least significant bit is discarded and the empty MSB is filled with the value of the previous MSB.

ashr symbol is used for * Right Arithmetic Shift*.

We can easily understand this by the example given below.

R2 ← shr R2.

When it is multiplied or divided by 2 (two). The sign bit
is 0 for positive and 1 for negative. Negative numbers are in *2's complement*
form. Figure 4-11 shows a typical register of n bits. Bit Rn- 1 places the
sign bit in the leftmost position.

Rn-2 is the most significant bit of the number and Ro is the least significant bit. Thus Rn-1 remains just the same, Rn-2 receives bits from Rn-1 and so on for the another bits in a register. The bit is lost in RO.

The starting bit of Rn-1 is lost and replaced by the bit
from Rn-2. A sign is reversed if the bit in rn-1 changes in value after the
shift. This is what happens when multiplying by 2 causes an overflow. Through
an **arithmetic shifts** overflow is followed if initially, before the shifts,
Rn-1 isn't equal to Rn-2.

Vs = Rn-1 + Rn-2

If Vs = 0, there is no overflow, but if Vs = I, the shift is followed by an overflow and a signal reversal.

## 0 Comments