Implement left shift and right shift.