## How to calculate nbits from powlimit

0

I remember some where was table and python scrypt for do this , when reinstall my debian i was lose this script.

Example we hv uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); what is = 0x1d00ffff

So 0x1d00fffff has 0x00ffff followed by 0x1d - 3 = 26 trailing 0 bytes with the whole thing padded out to 32 bytes. So the final result is 0x00000000ffff00000000000000000000000000000000000000000000000000000.