Use the connected number-systems workflow
Parse the input base first, compare representations, calculate, then make bit width, signedness and byte order explicit when those details matter.
Representation is context
A hexadecimal or binary string does not automatically tell you whether a value is signed, how wide it is, whether bytes are little endian, or whether the bits represent an integer or floating-point value.