What is SHIFT MICRO OPERATION? How SHIFT MICRO OPERATION works? Types of SHIFT MICRO OPERATION Examples Hardware implementation 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 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 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 1. Logical shift: A = 10101010 Logical sift left (shl): 1 0101010 ANS: 0101010 0 Logical sift right (shr): 1010101 0 ANS: 0 1010101 2. Circular shift A = 10101010 Circular sift left (cil): 1 0101010 ANS: 0101010 1 Circular sift right (cir): 1010101 0 ANS: 0 1010101 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)
A = 10101010 Arithmetic shift right (ashr): Divides signed binary number by 2 A= 42 (decimal) A= 42 / 2 = 21
ANS: 10010101 (21 in binary)
It can be constructed with multiplexers 4 data inputs A through A 0 3
4 data outputs H through H
0 3
2 serial inputs: I for shift left
L
I for shift right
R
When S=0 the input data are shifted right
When S=1 the input data are shifted left THANK YOU