According to this post it is saying Two's complement is only for integers, but in Wolframalpha is is saying the Two's complement of 16.5 is 0010000.1, how?

enter image description here

  • $\begingroup$ There are different names for one and the same thing. And there are different things going by the same name. Welcome, stranger. We call the prominent centre of attraction "earth". Gravity is a misconception: earth sucks. $\endgroup$ – greybeard May 17 at 6:57

It seems that WolframAlpha is using fixed-point representation. In effect, it is doubling your number and then representing it as two's-complement.

In more detail, WolframAlpha is guessing that you are interested in fixed-point representations of the form $$ xxxxxxx.x $$ in binary, that is, 8 bits in total, with the "decimal" point at the fixed position between the 7th and 8th bits. Using two's complement, you can represent all numbers from $-64$ (represented as $1000000.0$) to $+63.5$ (represented as $0111111.1$).

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.