What is the meaning of difficulty in Bitcoin mining? I'm a beginner in Bitcoin and Blockchain technology, so I have a question after reading about the difficulty in Bitcoin mining:
What the difficulty actually means?
I read that

A high difficulty means that it will take more computing power to mine
the same number of blocks, making the network more secure against
attacks

However, I don't clearly understand.
Ex: When the difficulty is 6, then what I can know from that number?
Thank you so much!
Suppose I give you some very complicated function f(), and I assign you the task of finding an input n with the property that f(n) is small.  That can be difficult.  I can make it more difficult by changing the definition of &quot;small&quot;.  If I ask you to find an n such that f(n)&lt; 100, that's difficult.  If I ask you to find an n such that f(n)&lt; 90, that's more difficult.
Once you've compiled a block, you're confronted with a function f().  The function itself depends both on the block you've just compiled and the solution someone found for the problem associated with the preceding block.  Successfully mining the block means finding an n such that f(n) is small.  The only way that anybody knows to solve this problem is by trial and error.
The definition of &quot;small&quot; is periodically adjusted.  That definition of &quot;small&quot; is what people mean by &quot;difficulty&quot;.