0
$\begingroup$

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?

  • 1
    Could you give an example input/output pair, and explain how you think the rule is violated?2011-08-04

1 Answers 1

1

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).