Given that computers operate in binary, we often see various limits and scopes come in powers of 2. How come there are not sixteen (0–15) but seventeen (0–16) different native segwit versions?

1 Answer 1


Segwit has 17 versions, because Script defines the constants OP_0OP_16 explicitly, while any other numbers would need to be added to the output script with OP_PUSHDATA.

  • 2
    That's exactly right. Commented Jul 18, 2023 at 19:58
  • Can OP_1NEGATE be an 18th SegWit version?
    – Brandon
    Commented Sep 7, 2023 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.