2. What is SHIFT MICRO OPERATION?
How SHIFT MICRO OPERATION works?
Types of SHIFT MICRO OPERATION
Examples
Hardware implementation
3. Shift Micro Operations are used for serial
transfer of data
They are also used in conjunction with
arithmetic, logic and other data-processing
operations
4. The contents of register can be shifted to
the left or right
At the same time that the bits are shifted,
the first flip-flop receives its binary
information from the serial input
Shift left operation - serial input transfers a
bit into the rightmost operation
Shift right operation - serial input transfers a
bit into the leftmost operation
5. The information transferred through the
serial input determines the type of shift
3 types of shifts:
1. Logical shift: Transfers 0 through the
serial input
2. Circular shift: Circulates the bits of the
register around the two ends without loss
of information
3. Arithmetic shift: Shifts a signed binary
number to the left or right
6. A = 10101010
Logical sift left (shl):
1 0101010
ANS: 0101010 0
Logical sift right (shr):
1010101 0
ANS: 0 1010101
1. Logical shift:
7. 2. Circular shift
A = 10101010
Circular sift left (cil):
1 0101010
ANS: 0101010 1
Circular sift right (cir):
1010101 0
ANS: 0 1010101
8. 3. Arithmetic shift:
A = 10101010
(underlined 1 suggests signed binary number )
Leave the signed bit unchanged because the
sign of the number remains the as it is when it is
multiplied or divided by 2
Arithmetic shift left (ashl):
Multiplies binary number by 2
A= 42 (decimal)
A= 42 * 2 = 84
ANS: 11010100 (84 in binary)
9. A = 10101010
Arithmetic shift right (ashr):
Divides signed binary number by 2
A= 42 (decimal)
A= 42 / 2 = 21
ANS: 10010101 (21 in binary)
10.
11. It can be constructed with multiplexers
4 data inputs A0 through A3
4 data outputs H0 through H3
2 serial inputs: IL for shift left
IR for shift right
When S=0 the input data are shifted right
When S=1 the input data are shifted left