Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 931 Bytes

13.mdx

File metadata and controls

34 lines (22 loc) · 931 Bytes
fork group
Frontier
Comparison & Bitwise Logic Operations

Index 1 is top of the stack. See PUSH.

Notes

All values are treated as two’s complement signed 256-bit integers.

Stack input

  1. a: left side signed integer.
  2. b: right side signed integer.

Stack output

  1. a > b: 1 if the left side is bigger, 0 otherwise.

Examples

* Input Output * * Input Output
1 0 1 * 1 10 0
2 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF * 2 10

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.