<p>Because they aren't the same. It appears that this script IDE interprets things inside of angle brackets (<code>&lt;</code> and <code>&gt;</code>) as strings, not as hex values. However a hash is not a string, it is a sequence of bytes which may be represented using hexadecimal values.</p>

<p>So what your script is actually doing is putting the string <code>1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU</code> on the stack and then hashing it and putting the byte value <code>E105E01B92119CC55D753248CE3A32C82A9BB308</code>. But then you push the string <code>E105E01B92119CC55D753248CE3A32C82A9BB308</code> onto the stack except this has a byte value of <code>45313035453031423932313139434335354437353332343843453341333243383241394242333038</code>. The <code>OP_EQUAL</code> is then comparing the two byte values <code>E105E01B92119CC55D753248CE3A32C82A9BB308</code> and <code>45313035453031423932313139434335354437353332343843453341333243383241394242333038</code> which are obviously not equal to each other and thus the script fails.</p>

<p>Instead you need to tell this program that you want to push the byte values <code>E105E01B92119CC55D753248CE3A32C82A9BB308</code> to the stack, not the string representation of these hex characters. To do that, just don't surround it with angle brackets. This works for me:</p>

<pre><code>&lt;1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU&gt; OP_HASH160 E105E01B92119CC55D753248CE3A32C82A9BB308 OP_EQUAL
</code></pre>

CC BY-SA 4.0
2019-06-26T02:54:26.007Z
2019-06-26T02:54:26.007Z
Ava Chow
<p>I went to <a href="https://siminchen.github.io/bitcoinIDE/build/editor.html" rel="nofollow noreferrer">https://siminchen.github.io/bitcoinIDE/build/editor.html</a> to try some bitcoin scripting and I wrote this script:</p>

<pre><code>&lt;1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU&gt; OP_HASH160 &lt;E105E01B92119CC55D753248CE3A32C82A9BB308&gt; OP_EQUAL
</code></pre>

<p>Screenshot:</p>

<p><a href="https://i.sstatic.net/XLKnD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XLKnD.png" alt="see screenshot"></a></p>

<p>My script fails even though both the hashes are same. Why?</p>

CC BY-SA 4.0
2019-06-25T17:10:14.747Z
why are you trying to calculate the hash160 of a Bitcoin address? That is not common. Also looks like the tool thinks the address is a hex value (0x prefix) which would obviously been invalid.
JBaczuk
<script><hash><utxo><output><transaction-input>
OP_EQUAL not working properly
ParmuTownley
# OP_EQUAL not working properly

(Asked by: username_0 on 2019-06-25)

I went to <https://siminchen.github.io/bitcoinIDE/build/editor.html> to try some bitcoin scripting and I wrote this script:

```
<1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU> OP_HASH160 <E105E01B92119CC55D753248CE3A32C82A9BB308> OP_EQUAL

```

Screenshot:

[![see screenshot](https://i.sstatic.net/XLKnD.png)](https://i.sstatic.net/XLKnD.png)

My script fails even though both the hashes are same. Why?

**Tags:** script, hash, utxo, output, transaction-input

> **Comments:**
> **username_1**: why are you trying to calculate the hash160 of a Bitcoin address? That is not common. Also looks like the tool thinks the address is a hex value (0x prefix) which would obviously been invalid.  

---

## 1 answers

### Answer by username_2 on 2019-06-26. Score: 1 | Accepted answer

Because they aren't the same. It appears that this script IDE interprets things inside of angle brackets (`<` and `>`) as strings, not as hex values. However a hash is not a string, it is a sequence of bytes which may be represented using hexadecimal values.

So what your script is actually doing is putting the string `1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU` on the stack and then hashing it and putting the byte value `E105E01B92119CC55D753248CE3A32C82A9BB308`. But then you push the string `E105E01B92119CC55D753248CE3A32C82A9BB308` onto the stack except this has a byte value of `45313035453031423932313139434335354437353332343843453341333243383241394242333038`. The `OP_EQUAL` is then comparing the two byte values `E105E01B92119CC55D753248CE3A32C82A9BB308` and `45313035453031423932313139434335354437353332343843453341333243383241394242333038` which are obviously not equal to each other and thus the script fails.

Instead you need to tell this program that you want to push the byte values `E105E01B92119CC55D753248CE3A32C82A9BB308` to the stack, not the string representation of these hex characters. To do that, just don't surround it with angle brackets. This works for me:

```
<1PUzZ61FSVTn12CafJC85Vy1ts3BoFcXdU> OP_HASH160 E105E01B92119CC55D753248CE3A32C82A9BB308 OP_EQUAL

```


---

