What Is the Mathematical Relationship between Difficulty and the Number of Leading Zeros in a Block Hash?
The difficulty target is inversely proportional to the number of leading zeros required in a valid block hash. The difficulty is a measure of how hard it is to find a hash below a specific target value.
A higher difficulty means the target value is lower, which mathematically translates to requiring more leading zeros (or a smaller hexadecimal value) in the resulting SHA-256 hash.