Why Your Hex Converter Lies to You: Two's Complement, the 53-Bit Wall, and Radix Magic

Every programmer eventually encounters that moment of quiet confusion during a late-night debugging session: you cast a signed 8-bit -1 to hexadecimal, expecting something clean and human-readable, only for the debugger to spit back 0xFF. Widen it to a 32-bit register, and it suddenly balloons into 0xFFFFFFFF.Where did the minus sign go? Why didn't it output -0x01? And why does running 0x20000000000001 through your standard JavaScript parser silently yield the wrong integer altogether?Number base conversion is often treated as a trivial Computer Science 101 exercise—something solved with a simple parseInt(val, 16) or a textbook division-by-radix loop. But beneath high-level abstractions
…