user134673: As far as I can understand the resulting hash should start with difficulty number of zeroes before a block can be mined. That is: H(HashOfPreviosBlock + nonce) < target but why is a 64 bit number guaranteed to generate

user13866: 
the resulting hash should start with difficulty number of zeroes before a block can be mined.

No, the hash should be less than the target for the mined block to be valid (acceptable to others).
The often repeated "number of leading zeroes" is not the reality.
The difficulty is not a count of leading zeroes and is not used in Bitcoin's assessment of block-hashes.

H(HashOfPreviosBlock + nonce) < target

The block hash is a hash of much more data than that. It includes, for example, the Merkle root and some other items in the block header.

why is a 64 bit number guaranteed to generate

The nonce is a 32 bit number and it isn't guaranteed that there exists a 32-bit value that would generate a hash less than a target. (See links under "Related" at right of web-page)
For many years it has been necessary for miners to vary much more than the nonce. There is ExtraNonce, selection and order of transactions, contents of coinbase transaction, timestamp, etc.

134673: <p>As far as I can understand the resulting hash should start with <code>difficulty</code> number of zeroes before a block can be mined. That is: <code>H(HashOfPreviosBlock + nonce) &lt; target</code> but why is a 64 bit number guaranteed to generate</p>
 13866: <blockquote>
<p><strong>the resulting hash should start with difficulty number of zeroes before a block can be mined.</strong></p>
</blockquote>
<p>No, the hash should be less than the target for the mined block to be valid (acceptable to others).</p>
<p>The often repeated &quot;number of leading zeroes&quot; is not the reality.</p>
<p>The difficulty is not a count of leading zeroes and is not used in Bitcoin's assessment of block-hashes.</p>
<blockquote>
<p><strong><code>H(HashOfPreviosBlock + nonce) &lt; target</code></strong></p>
</blockquote>
<p>The block hash is a hash of much more data than that. It includes, for example, the Merkle root and some other items in the block header.</p>
<blockquote>
<p><strong>why is a 64 bit number guaranteed to generate</strong></p>
</blockquote>
<p>The nonce is a 32 bit number and it isn't guaranteed that there exists a 32-bit value that would generate a hash less than a target. (See links under &quot;Related&quot; at right of web-page)</p>
<p>For many years it has been necessary for miners to vary much more than the nonce. There is ExtraNonce, selection and order of transactions, contents of coinbase transaction, timestamp, etc.</p>
