How this works
Two's complement represents negative numbers by inverting all bits of the positive value and adding 1. This tool computes the exact bit pattern for a given bit width, or decodes a raw hex value as a signed number of that width (checking whether the most significant bit is set).