Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 596 Bytes

19.mdx

File metadata and controls

28 lines (18 loc) · 596 Bytes
fork group
Frontier
Comparison & Bitwise Logic Operations

Index 1 is top of the stack. See PUSH.

Stack input

  1. a: binary value.

Stack output

  1. ~a: the bitwise NOT result.

Example

* Input Output
1 0 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

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.