# What determines the size of a hash during mining?

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?

## 1 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)
``````
• 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. blockchain.com/btc/block/… Nov 6, 2021 at 15:20
• @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. Nov 6, 2021 at 21:39