feat: implement 0x1C - SHR opcode #16
Labels
enhancement
New feature or request
opcode
Implementation of an opcode
workshop
Reserved / Dedicated for workshops
Milestone
fork: Constantinople
group: Comparison & Bitwise Logic Operations
Index 1 is top of the stack. See PUSH.
Notes
Shift the bits towards the least significant one. The bits moved before the first one are discarded, the new bits are set to 0.
Stack input
shift
: number of bits to shift to the right.value
: 32 bytes to shift.Stack output
value >> shift
: the shifted value. Ifshift
is bigger than 255, returns 0.Examples
1
1
1
1
4
0xF
2
2
2
0xFF
Reproduce in playground.
Error cases
The state changes done by the current context are reverted in those cases:
The text was updated successfully, but these errors were encountered: