# Why is there a OP_NUMEQUAL opcode? Does OP_NUMEQUAL offer a subset of the functionality of OP_EQUAL?

There is a OP_EQUAL opcode that returns (from the Bitcoin wiki):

1 if the inputs are exactly equal, 0 otherwise

And a OP_NUMEQUAL opcode that returns:

1 if the numbers are equal, 0 otherwise

In the case where you want to use OP_NOTEQUAL it is suggested to use OP_NUMNOTEQUAL so it seems like OP_EQUAL and OP_NUMEQUAL can be used interchangeably when dealing with integers:

`//case OP_NOTEQUAL: // use OP_NUMNOTEQUAL`

What is the point of the OP_NUMEQUAL opcode? Can't you just always use OP_EQUAL instead? Is OP_NUMEQUAL more efficient than OP_EQUAL when dealing with integers?

OP_NUMEQUAL doesn't provide a subset of the functionality of OP_EQUAL as they evaluate differently when comparing `0x01` with `0x0001`. OP_NUMEQUAL evaluates `0x01` and `0x0001` as equal as it compares `1` with `1` whilst OP_EQUAL does not deem them equal as it compares a different number of bytes. Hence which one you use in your script will be determined by whether you want such a comparison to evaluate to equal or not.
Note the Taproot descriptor `multi_a` uses the OP_NUMEQUAL opcode. `multi_a(k,A,B,C,...Z)` translates to:
``````[A] CHECKSIG [B] CHECKSIGADD [C] CHECKSIGADD ... [Z] CHECKSIGADD <k> OP_NUMEQUAL
There is no strong reason for it doing so as `multi_a` will always have the number encoded minimally. It arguably makes it easier to parse as OP_EQUAL is used in multiple other Miniscript constructions.