Function Input | Result | Comments |
INT1SHL(1,0) | 1 | Arg2 is 0, so no shift takes place. |
INT1SHL(1,1) | 2 | |
INT1SHL(3,2) | 12 | |
INT1SHL(3,10) | 12 | Arg2 is 10, the same as 2 mod 8 (the number of bits in INT1), so the result is the same as INT1SHL(3,2). |
INT1SHL(27,1,14) | 20 | Arg3 is present. 27 (0001 1011) is ANDed with 14 (0000 1110), with result 10 (0000 1010). Shifted left 1, it becomes 20 (0001 0100). |
INT1SHL(127,1) | ||
INT2SHL(127,17) | ||
INT1SHL(-2,1) | ||
INT1SHL(-127,0) | ||
INT1SHL(-127,1) | 2 | |
INT1SHL(-128,0) | 0 | |
INT2SHL(-128,0) |