<p>Segwit has 17 versions, because <em><a href="https://en.bitcoin.it/wiki/Script#Constants" rel="noreferrer">Script</a></em> defines the constants <code>OP_0</code>–<code>OP_16</code> explicitly, while any other numbers would need to be added to the output script with <code>OP_PUSHDATA</code>.</p>

CC BY-SA 4.0
2023-07-18T19:58:30.243Z
That's exactly right.
Pieter Wuille
CC BY-SA 4.0
2023-09-07T16:06:14.803Z
Can OP_1NEGATE be an 18th SegWit version?
Brandon - Rearden
CC BY-SA 4.0
2023-07-18T19:42:42.473Z
2023-07-18T23:41:29.253Z
2023-07-18T23:41:29.253Z
Murch
<p>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?</p>

<segregated-witness>
Why are there 17 native segwit versions?
Murch
# Why are there 17 native segwit versions?

(Asked by: username_0 on 2023-07-18)

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?

**Tags:** segregated-witness


---

## 1 answers

### Answer by username_0 on 2023-07-18. Score: 9 | Accepted answer

Segwit has 17 versions, because *[Script](https://en.bitcoin.it/wiki/Script#Constants)* defines the constants `OP_0`–`OP_16` explicitly, while any other numbers would need to be added to the output script with `OP_PUSHDATA`.

> **Comments:**
> **username_1**: That's exactly right.  
> **username_2**: Can OP_1NEGATE be an 18th SegWit version?  

---

