Complete the code to perform a left shift by 2 bits on the signal data_in.
data_out <= data_in [1] 2;
srl which shifts bits to the right.rol or ror instead of shift.The sll operator shifts bits to the left, filling with zeros on the right.
Complete the code to perform a right shift by 3 bits on the signal data_in.
data_out <= data_in [1] 3;
sll which shifts bits left.rol or ror instead of shift.The srl operator shifts bits to the right, filling with zeros on the left.
Fix the error in the code to rotate the signal data_in left by 1 bit.
data_out <= data_in [1] 1;
sll which shifts bits but does not wrap.ror which rotates right instead of left.The rol operator rotates bits to the left, wrapping the leftmost bit to the right end.
Fill both blanks to shift data_in right logically by 4 bits and assign to data_out.
data_out <= data_in [1] [2];
sll which shifts left.1.Use srl to shift right logically and 4 as the number of bits.
Fill both blanks to rotate data_in right by 2 bits and assign to data_out.
data_out <= data_in [1] [2];
srl which shifts but does not rotate.3.Use ror to rotate right and 2 as the number of bits.
