14
$\begingroup$

The maximum value I can have in my calculator is $10^{100}$. At first it seems right but when we consider that the calculator should stores its number as binary, this seems weird.

Why isn't the maximum exponent a base 2 number? Is this limit set manually in the calculator when building it?

Calculator used: Sharp EL-W516X (WriteView)

$\endgroup$
  • 2
    $\begingroup$ Are you sure that calculator actually uses binary internally? $\endgroup$ – Henning Makholm Jun 11 '17 at 23:08
  • $\begingroup$ @Henning Makholm Not at all, you can consider that part of the question. It's just what makes me wonder in the first place. $\endgroup$ – Winter Jun 11 '17 at 23:10
26
$\begingroup$

I don't know about the Sharp in particular, but it's not unusual for calculators to work in base ten internally (actually binary coded decimal, of course).

Among the advantages of doing so are

  • You don't need to do (moderately complex) conversions between decimal and binary for entering or displaying numbers,
  • It naturally avoids the most embarrassing rounding errors where, say, $0.003\times 2000-6$ fails to equal $0$.
  • It makes it easy to explain to your customers how many digits of precision they can expect in their calculations.

The main disadvantage relative to binary is that it takes slightly more work to calculate with a given precision. But raw calculation time is not really an issue for simple non-programmable calculators, and the effort saved by binary would be taken up again by needing to do binary-to-decimal conversions whenever you display anything.

Higher-end graphing or programmable calculators will be somewhat more likely to use binary arithmetic for performance.


All that said, it is still pretty likely that you calculator represents the exponent in pure binary internally. Limiting the exponent range to two digits could well have more pragmatic reasons, such as

  • Being sure that every representable number can fit in the calculator's display.
  • Leaving some additional range for intermediaries such that you can be sure that internal computations will not overflow as long as inputs and outputs are within the officially supported range.
  • Because market research told them that, among those users who are likely to complain about a limit they don't understand, those who complain most obnoxiously tend to be those who find 127 a stranger limit than 99.
$\endgroup$
  • $\begingroup$ Also keep in mind that some industries (especially finance) actually require the use of BCD for fear of rounding errors and a "Superman III" scenario. $\endgroup$ – fluffy Jun 12 '17 at 3:03

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.