So, essentially what my question is what does the "syntax" of a bdiff (bitcoin target difficulty) look like? I know that its a number, i.e the current network difficulty is set at around 27Trillion. Your node must output an SHA256 hash below that target.
However, mathematically speaking, how does an SHA256 hash, i.e: 58a57cbaefb39229b8bb7f7f5ba4dae105cd4a75aa1cd72873ee74fdb323a201
, have a value higher or lower than 27Trillion, which is what the bdiff is configured to.
Is the network difficulty really just a number, i.e 27Trillion, or is it also a 256-bit hash/number of some kind that would be more comparable?