Shift operators (shl(x, y)
, shr(x, y)
, sar(x, y)
) in Solidity assembly apply the shift operation of x
bits on y
and not the other way around, which may be confusing. Check if the values in a shift operation are reversed. (see here)
- Shift Operators
shl(x,y)
,shr(x,y)
,sar(x,y)