Opcodes · aritmética · habilitado

OP_1SUB (0x8c)

Resta 1 al número superior. Desde mayo de 2025, los números pueden tener hasta 10.000 bytes de longitud (BigInt).

Verificado
Pila: entrada → salida
a → a-1
Desde
Script original de Bitcoin
Costo
Base instruction cost 100, plus the result length, plus the result length again to cover number encoding (2025 VM limits).
Estado en Bitcoin
Igual en Bitcoin (BTC)BTC limits arithmetic inputs to 4 bytes.

Ejemplo

OP_3 OP_1SUB OP_2 OP_EQUAL

Recórrelo opcode por opcode en Bitauth IDE, el depurador de la VM de BCH en el navegador.

Fuentes

  1. Libauth BCH_2023_05 opcodes (bch-2023-opcodes.ts)
  2. CHIP-2021-05 VM Limits: Targeted Virtual Machine Limits
  3. CHIP-2024-07 BigInt: High-Precision Arithmetic