View Source BitcoinLib.Script.Opcodes.Arithmetic.Not (BitcoinLib v0.4.7)
Based on https://en.bitcoin.it/wiki/Script
Word OP_NOT Opcode 145 Hex 0x91 Input in Output out If the input is 0 or 1, it is flipped. Otherwise the output will be 0.
Link to this section Summary
Functions
Returns <<0x91>>
If the input is 0 or 1, it is flipped. Otherwise the output will be 0.
Returns 0x91
Link to this section Types
@type t() :: BitcoinLib.Script.Opcodes.Arithmetic.Not
Link to this section Functions
@spec encode() :: <<_::8>>
Returns <<0x91>>
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Not.encode()
<<0x91>>
If the input is 0 or 1, it is flipped. Otherwise the output will be 0.
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Not.execute(
...> %BitcoinLib.Script.Opcodes.Arithmetic.Not{},
...> [1, 3, 1]
...> )
{:ok, [0, 3, 1]}
@spec v() :: 145
Returns 0x91
examples
Examples
iex> BitcoinLib.Script.Opcodes.Arithmetic.Not.v()
0x91