diff --git a/EIPS/eip-145.md b/EIPS/eip-145.md index bd2ebc02..91bf3232 100644 --- a/EIPS/eip-145.md +++ b/EIPS/eip-145.md @@ -4,7 +4,7 @@ Title: Bitwise shifting instructions in EVM Author: Alex Beregszaszi, Paweł Bylica Type: Standard Track - Category Core + Category: Core Status: Draft Created: 2017-02-13 @@ -34,7 +34,8 @@ The `SHL` instruction (shift left) pops 2 values from the stack, `arg1` and `arg ``` Notes: -- If the shift amount is greater or equal 256 the result is 0. +- The shift amount (`arg2`) is interpreted as an unsigned number. +- If the shift amount (`arg2`) is greater or equal 256 the result is 0. ### `0x1c`: `SHR` (logical shift right) @@ -45,7 +46,8 @@ arg1 udiv 2^arg2 ``` Notes: -- If the shift amount is greater or equal 256 the result is 0. +- The shift amount (`arg2`) is interpreted as an unsigned number. +- If the shift amount (`arg2`) is greater or equal 256 the result is 0. ### `0x1d`: `SAR` (arithmetic shift right) @@ -56,7 +58,7 @@ arg1 sdiv 2^arg2 ``` Notes: -- `arg2` is interpreted as unsigned number. +- The shift amount (`arg2`) is interpreted as an unsigned number. - If the shift amount (`arg2`) is greater or equal 256 the result is 0 if `arg1` is non-negative or -1 if `arg1` is negative. The cost of the shift instructions is set at `verylow` tier (3 gas).