Skip to content

Commit

Permalink
Explain sign of arg1/arg2
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Jul 3, 2017
1 parent e5ca919 commit 4218665
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions EIPS/eip-145.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The `SHL` instruction (shift left) pops 2 values from the stack, `arg1` and `arg
```

Notes:
- The value (`arg1`) is interpreted as an 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.

Expand All @@ -46,6 +47,7 @@ floor(arg1 / 2^arg2)
```

Notes:
- The value (`arg1`) is interpreted as an 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.

Expand All @@ -58,6 +60,7 @@ floor(arg1 / 2^arg2)
```

Notes:
- The value (`arg1`) is interpreted as a signed 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.

Expand Down

0 comments on commit 4218665

Please sign in to comment.