Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have read Sign Extention Rule in Binary Numbers. I am having a problem.When I calculate Binary from Decimal from calculator(FX-992ES PLUS), it always appends 0's to the converted number. It is against the bit extension rule. Does it follow some other format or I am just misleading about it?

share|cite|improve this question
Please correct the tag, I could not find a relevant tag for it. Thanks – Fahad Uddin Aug 4 '11 at 18:43
Could you give an example input/output pair, and explain how you think the rule is violated? – J. M. Aug 4 '11 at 18:54

It all depends on how numbers are represented. In calculators, numbers are represented as an unsigned number + sign; the first part is itself composed of a mantissa and an exponent (look up "floating point"). When a decimal is converted to binary, the unsigned part is converted without sign extension, and the sign is just copied.

Sign extension happens when numbers are stored in two's complement (where the two is replaced by the actual base). This is usually not the case for floating point numbers. It also doesn't make sense, since this is an internal representation - you, the user, should not worry about it. When converting $-1$ from decimal to binary, there's no reason for you to get $-11111111$ or even $11111111$. You just get $-1$, even though it may internally be stored differently (which is not the case for floating-point calculators, as mentioned above).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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