Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 946 Bytes

1C.mdx

File metadata and controls

34 lines (22 loc) · 946 Bytes
fork group
Constantinople
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

  1. shift: number of bits to shift to the right.
  2. value: 32 bytes to shift.

Stack output

  1. value >> shift: the shifted value. If shift is bigger than 255, returns 0.

Examples

* Input Output * * Input Output
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:

  • Not enough gas.
  • Not enough values on the stack.