Open timleg002 opened 2 years ago
I think that a switch would not be sufficient, because it depends on the word size if a two's complement number is positive or negative. E.g. 0xFFFF seen as a 16 bit number is negative, but seen as a 32 bit number is positive. So the calculator needs to know the intended word size to interpret the number correctly. However, what is confusing is that the calculator uses two's complement for 64 bit numbers already. Just enter hex "FFFFFFFFFFFFFFFF" and the decimal number will suddenly switch from a positive number to "-1" after entering the last "F". This has the notion of a bug.
Goals
I'm currently deciphering a binary protocol, which is binary galore, so this would be helpful, maybe it'd even help explaining the concept to someone.