Home -> Teaching -> CSAS 1015 -> Strange Calculator

CSAS 1015 - A Strange Calculator


Below is an applet (a program) that adds two numbers. Try it out to see if it works. If you add "small" numbers, it works fine. However, if you add larger numbers it no longer works.

Explain why.

Then try to figure out how many bytes the program uses to represent an integer.

Bert G. Wachsmut
Last modified: 09/15/03