How does one know they solved a block?
Assuming everything else in the block is valid, the block hash simply needs to be smaller than the target. https://en.bitcoin.it/wiki/Difficulty explains how to find the target from the bits representation; and to find it from the human-readable difficulty D, you calculate 2^208*(2^16-1)/D.