11^0 1
11^1 1 1
11^2 1 2 1
11^3 1 3 3 1
11^4 1 4 6 4 1 11^0 1
11^1 1 1
11^2 1 2 1
11^3 1 3 3 1
11^4 1 4 6 4 1It's also a useful self-test if you think the battery might be going.
I have written an iOS calculator app and had very interesting times trying to find and mimic these shortcuts. I have thought for a long time they had to follow from some simple implementation detail, as all the calculators got them precisely the same, but I never found this one consistent rule, I had to implement the features in a series of hacks.
The old Sinclair pocket calculators had some known arithmetic inaccuracies.
Different operations take noticeably different amounts of time; a "timing attack" like those used for cryptanalysis might yield clues to what's in the black box.
The way new digits appear on the display when typed in suggests it might be implemented as a shift register. It would be interesting to look at high speed video of the display when the answer to a long computation appears; do the answer digits appear (rapidly) one at a time? Do they shift in from the left? Three caveats: (1) I've never noticed it happening; (2) LED displays are almost always multiplexed, but you could probably see through that; and (3) probably wouldn't work on an LCD because too slow. I used to have a vacuum fluorescent display calculator, though; IIRC it was not multiplexed.
There are a few articles on the web about the architecture of calculators, including the Busicom [1] and Sinclair [2]. Personally, I want to hear more about zoul's research---how did you do it?
[2] http://files.righto.com/calculator/sinclair_scientific_simul...
56.96124843225 ^ 56.96124843225
Wolfram confirms that it's pretty close to a full googol. Of course, you can keep adding digits to the end of the number to make it even more precise. Maybe I'll write a script to do that.
5th row: 1 5 10 10 5 1
Writing this a bit backwards, 1 * 1 + 5 * 10 + 10 * 100 + 10 * 1000 + 5 * 10000 + 1 * 100000 = 161051 = 11^5.
def pascal(n):
base = max(2, 2**n)
row = (base+1)**n
return [row/base**i % i for i in range(n+1)]
Nice, but hopelessly inefficient. :) You can also calculate a binomial coefficient the same way without any looping construct (the exponential operator does the looping for you).Needless to say, I didn't get it, but one guy in our class, like an 8th grader, did. He was pretty smart.