Re: RPN in primary education Message #22 Posted by Paul Townsend (UK) on 25 Mar 2013, 5:06 p.m., in response to message #15 by Thomas Klemm
That picture brings back memories! The machine we had in school looked a bit more modern than that (1960's model no doubt), but the registers were all the same size (10 digit input register, 8 digit counter, 13 digit accumulator) and the internal works were quite likely unchanged.
My procedure relied on the identity 1 + 3 + 5 + 7 + . . . + (2n-1) = n^2 (which I had discovered for myself at the age of about six) so that consecutive *odd* numbers were subtracted each time until one was found that "didn't go". Let us find the square root of 10. We begin with 10(.)00000000 in the accumulator, and clear the counter. Begin with 01(.)00000000 in the input register, and subtract. Then change it to 04(.)000000 and subtract again, etc.
You find that the subtraction of 07(.)000000 "doesn't go" (the bell rings and the accumulator reads 999.....) so you undo it, reduce the input register by *one* (to 06(.)000000), shift the carriage one place left, enter a new 1 into the input register (so it now reads 61) and start subtracting again. The subtraction of 61..... goes, the next one of 63..... does not. So reduce it to 62....., shift one place left again, and insert a new 1 to make 621...... and continue as before. This position survives six operations, up to 631..... (633..... doesn't go).
Etc. etc.
In this way the square root builds up, digit by digit, in the counter register, and the accumulator gets reduced to as near zero as possible. (The input register tends to end up at nearly double the actual square root - why?)
Edited: 25 Mar 2013, 5:07 p.m.
|