convert left/right shifts