<blockquote>
<p><strong>From what I understand is that a miner generates nonces to find a nonce that is smaller than the target hash.</strong></p>
</blockquote>
<p>No a miner repeatedly assembles data and chooses a value for one datum called a nonce, then calculates the hash of this data (including the nonce). The miner repeats this until the calculated <strong>hash</strong>, not the nonce, is smaller than the target value.</p>
<blockquote>
<p><strong>However, how does one determine the size of that nonce/hash?</strong></p>
</blockquote>
<p>The hash is a number. You can compare numbers numerically to see which is larger. For example, 52 is smaller than 57. The original code was</p>
<pre><code>if (hash &lt;= hashTarget)
</code></pre>
<p>See <a href="https://bitcoin.stackexchange.com/q/102414/13866">How does solving a block work in relation to the first letter/number after the 0&#39;s?</a></p>

CC BY-SA 4.0
2021-11-06T15:20:37.380Z
Okay, so the nonce is hashed into the final hash? So for instance, the hash of block 708493 is 00000000000000000004c8d2e38f9e9dc89c16948a05db243207745e86619e8e which has the nonce of 2,905,666,658.

https://www.blockchain.com/btc/block/00000000000000000004c8d2e38f9e9dc89c16948a05db243207745e86619e8e
lodeboon
CC BY-SA 4.0
2021-11-06T21:39:26.583Z
@lodeboon the block header is the part of the block that is hashed, and the nonce is part of the block header. The value of the nonce doesn't matter in regards to the hash target though, only the value of the hash (the output) does.
chytrik
CC BY-SA 4.0
2021-11-04T16:46:00.473Z
2021-11-04T16:51:31.637Z
2021-11-04T16:51:31.637Z
RedGrittyBrick
<p>I have been struggling with this quite a bit. From what I understand is that a miner generates nonces to find a nonce that is smaller than the target hash. However, how does one determine the size of that nonce/hash? Does every digit has a different size or how should I interpret this?</p>

<hash><nonce>
What determines the size of a hash during mining?
lodeboon
# What determines the size of a hash during mining?

(Asked by: username_0 on 2021-11-04)

I have been struggling with this quite a bit. From what I understand is that a miner generates nonces to find a nonce that is smaller than the target hash. However, how does one determine the size of that nonce/hash? Does every digit has a different size or how should I interpret this?

**Tags:** hash, nonce


---

## 1 answers

### Answer by username_1 on 2021-11-04. Score: 2 | Accepted answer

> **From what I understand is that a miner generates nonces to find a nonce that is smaller than the target hash.**

No a miner repeatedly assembles data and chooses a value for one datum called a nonce, then calculates the hash of this data (including the nonce). The miner repeats this until the calculated **hash**, not the nonce, is smaller than the target value.

> **However, how does one determine the size of that nonce/hash?**

The hash is a number. You can compare numbers numerically to see which is larger. For example, 52 is smaller than 57. The original code was

```
if (hash <= hashTarget)

```

See [How does solving a block work in relation to the first letter/number after the 0's?](https://bitcoin.stackexchange.com/q/102414/13866)

> **Comments:**
> **username_0**: Okay, so the nonce is hashed into the final hash? So for instance, the hash of block 708493 is 00000000000000000004c8d2e38f9e9dc89c16948a05db243207745e86619e8e which has the nonce of 2,905,666,658.  https://www.blockchain.com/btc/block/00000000000000000004c8d2e38f9e9dc89c16948a05db243207745e86619e8e  
> **username_2**: @username_0 the block header is the part of the block that is hashed, and the nonce is part of the block header. The value of the nonce doesn't matter in regards to the hash target though, only the value of the hash (the output) does.  

---

