AHHH, can you go into that a little more, what do you mean by under a certian target?
Imagine that the hash picks a number between 0 and 999,999.
You could say that the difficulty is to count the number of leading zeros.
One zero means you have to get 99,999 or lower (099999 or lower). That is one in 10 (difficulty 10).
Two zeros means you have to get 9,999 or lower (009999 or lower). That is one in 100 (difficulty 100) and so on.
You could alternatively just use a threshold. For a difficulty of 63, you use 1,000,000 / 63 = 15,873.
You don't say that you need 1 zero, you say the number must be 15,873 or lower. That gives a 1 in 63 chance, so a difficulty of 63.
With the actual hash, it picks a number between 0 and (2
256 - 1). The difficulty is also divided by 2
32. A difficulty of 1 means that you have a 1 in 2
32 chance of a hash being less than the threshold.