Calculator

If you designed your own scientific calculator – nothing too fancy or revolutionary, there are no bonus points for breaking with tradition nor for seeing how many buttons you can fit on – where would you place the buttons to make the calculator most pleasing to your mind’s eye? There is elegance and intellectual beauty in a layout whereby buttons adjacent to each other implement similar functionality and there is a reason for every button being situated exactly where it is, but how exactly would you maximise the elegance of your calculator? In this post, I will consider my own answer.

I would place the digits in the usual arrangement, with the zero on the same row as equality, and the basic operators above equality and to the right of the square composed of the digits from 1 to 9. I would also keep with tradition in placing the decimal point between the zero and the equality button. The positive/negative toggle logically belongs in this region too, because it shares with the decimal point and digits the role of being used for the raw entry of numbers.

Considering now the basic operators, I am doing nothing new in placing addition to the right of the digit 3, and subtraction (because it is the inverse of addition) to the right of this. Likewise I would place multiplication to the right of the digit 6, and division (the inverse of multiplication) to its right. Above addition (and to the right of the digit 9), I would place the exponentiation operator ab, recognising in the layout the fact that exponentiation is to multiplication as the latter is to addition. Naturally, the button to the right of exponentiation I would give to the calculation of roots, a1/b.

So far, the calculator I’ve described would look somewhat like this:

calculator1.png

However, exponentiation really has two inverses. One is the taking of roots, which restores the value of a in ab given knowledge of b, and the other is the free-base logarithm logb(a), which restores the value of b in ab given knowledge of a. Traditionally, scientific calculators include a button for calculating the base ten logarithm but no button for the free-base logarithm, requiring that if the user wishes to calculate a logarithm in free base they must do so indirectly, using the relationship logb(a) = log10(a)/log10(b). This traditional arrangement gives the base ten logarithm a special status that it does not deserve, because base ten is irrelevant to logarithms, the significance of which lies in the relationship with exponentiation: loga(ab)=b. Therefore on my calculator I would dispense with the traditional log button and replace it with the free-base logarithm, situating this function in such a way as to acknowledge its relationship to exponentiation. The logical way to do this is to make it share the same button as the other inverse of exponentiation, i.e. the taking of roots.

Having now given two functions to one button, let us consider which alternative functions would be appropriate for other buttons that I have already defined. The alternative function I’d choose for the exponentiation button would be the reciprocal, because of all special cases of exponentiation, x-1 is the one that most deserves a special place on the calculator. That for the multiplication button would be the factorial operator, because it’s an important special use of multiplication. That for the division button would be the remainder operator, i.e. the operator which gives the remainder of dividing integer a by integer b. I can’t think of any operators worth putting on a calculator that are good matches for addition and subtraction, but one very important thing which is not an operator but shares with operators the property of being used to specify formulae is the bracket. I can think of nothing more fitting than to make the alternative function of the addition button the opening bracket, and that of subtraction the closing bracket.

A very appropriate alternative function for the equality button would be what we might call the page toggler, which switches between showing the main display and showing the digits that drop off the end (the equality button shows you the answer and the page toggler then shows you the whole answer, so they are related and belong together). For the decimal point, a sensible alternative function is that of specifying a base ten exponent. It is traditional for the digits from 0 to 5 to have, as their second function, the digits from A to F in hexadecimal mode, if the calculator has that functionality.

I have now finished describing the lower half of my calculator design, which would look somewhat like this.

calculator2.png

I still need to define the buttons on the upper half of the calculator, and my vision is for three rows of buttons, each united by a particular theme. The first row (in accordance with very sensible tradition) would begin with the on button, doubling as the button to clear the current equation and with off as its alternative function. (It is traditional to have a nearby button to clear the most recently entered number, but I have never approved of that and I’ll discuss the issue of error correction later.) To the right of the on button would be the button for selecting alternative functions. The remaining three buttons of the first row would be united by the theme of switching between different modes: the first, a switch between different bases (such as binary and hexadecimal) about which I will elaborate in a moment; the second, a switch between scientific and ordinary notation; the third, a switch between degrees and radians as the preferred units of angles.

More on bases. Most calculator manufacturers seem to have got the impression that binary and hexadecimal are primarily something to do with computers. But computer binary is not the same thing as true, mathematical binary – true binary numbers can include minus signs and “decimal” points (more appropriately called radix points), whereas computer binary can only represent these things by encoding them within the ones and zeros. They are two different things, but traditional calculators only ever implement computer binary. I would prefer my calculator to implement true binary and hexadecimal, as well as any integer base from 2 to 16. To select a base between 2 and 9, the user would press the base selector button and then the digit corresponding to the base. To select a base between 10 and 16, the user would press the base selector button, then the alternative function button, and then the digit corresponding to the base minus ten. I might also allow “base” + “zero” as a shortcut for base ten.

Computer binary and hexadecimal can be useful, though, so I would implement them through the alternative function of the base selector button. If the current base is 2 or 16 (possibly 4 or 8 as well), the alternative function of the base selector button would toggle between the mathematically pure version of the base versus the two’s complement notation used by computers (the latter, naturally, works only for integers).

Here is the top portion of the calculator as I’ve described it so far.

calculator3.png

The second row would belong to the trigonometric and base e exponential functions. By extension (linked to trigonometry by the theme of angles) I would also include the degrees/minutes/seconds button as the first button on the row. Included on many good scientific calculators, this button is very useful for calculations involving time as well as angles. You press it to indicate that the number you’ve already entered is the number of degrees (or hours) and that the number you’re about to enter is the number of minutes, and (if applicable) you press it again to indicate that you have finished entering the number of minutes and now wish to enter the number of seconds. Very handy for calculations such as “seventeen minutes and forty-five seconds plus two hours, forty-eight minutes and fifty-two seconds”. The button’s traditional alternative function, abbreviated DMS on most calculators, toggles between displaying a result in degree/minute/second notation and simply as a decimal number of degrees (or hours). I fully approve of that tradition and would conform to it.

The remaining buttons on the row would be sin, cos, tan and ex respectively, with the alternative functions being their inverses in accordance with excellent tradition. The top portion of the calculator, as so far specified, would look like this:

calculator4.png

The third row is the part of the calculator about which I am least committed, but its prototypical functionality would be that of memory, including a store, recall and clear facility. If the functionality includes storage for ten independent numbers (which it should), then “memory clear” would clear all of them in one go. We can list other functionality that logically belongs on the same row as memory. For example, some scientific calculators include a table of fundamental constants accessed by pressing a “constant” button followed by a numeric code, and this should go on the same row as memory because it is a sort of permanent memory. (Let’s make constant zero be pi.) Another feature that belongs on the same row is the random number generator, because a random number is in a sense the opposite of a stored number, and opposites have a great deal to do with each other by virtue of being opposites.

Concerning the random number generator, I would break with tradition just a little. If the buttons pressed immediately after the “random” button are digits, then the button would function as a prefix operator specifying a random integer less than the integer entered (for example pressing [random] [6] [7] [equals] would give a random integer between 0 and 66). But if the button pressed immediately after the “random” button is an operator or the equality button, then it should generate a random non-integer between zero and one.

Another related functionality is the recording and playing of macroes. To keep things simple, I will assume that only one macro can be stored at a time and that there is a facility to start and stop the recording (which can be pressed twice to clear the macro) and another to play it. Yet another functionality, included on some scientific calculators, is that of converting the number currently displayed on the calculator into another unit of measurement (such as celcius versus farenheit) using a built-in lookup table of formulae.

So for the third row of the calculator, the first button would be memory store, having the alternative function of memory clear. The second button would be memory recall, with the alternative function of random number generator. The third button would be the index to the table of constants, and its alternative function the table of unit conversions. The fourth button would play the stored macro, recording of which is started and stopped by its second function.

This leaves one more button on the calculator, which I would reserve for the most important functionality that we haven’t discussed yet – error correction. I would implement error correction in the form of an “undo” button, which would function as a backspace key if the most recently pressed button is a digit or decimal point. Its second function might as well be “redo” (i.e. to undo the undoing).

I have now described the entire calculator, so here is a picture:

calculator.png

To keep this post from being even longer than it is, I have refrained from giving rationales for some minor choices, and for leaving off some functionality traditionally included on scientific calculators. In some cases, the answer is because I believe the button to be useless and unworthy of being on any calculator (e.g. that is my attitude to the traditional “percent” button) and in other cases, it is because I either have no use for the functionality or have never been taught how it is useful.

I’ve thought about this subject – the perfect arrangement of buttons on a scientific calculator – every now and then over quite a few years, and this is the closest thing I have to a conclusion.

Advertisements

You are welcome to add your thoughts.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s