The Register Home Page

back to article Physicist reckons two-button calculator can do all elementary math

Every now and then, a researcher comes up with something that sounds either wrong or unoriginal to outsiders – yet carries just enough of a chance of being correct, novel, and consequential to demand a closer look. On this occasion, the honor goes to Andrzej Odrzywołek, a postdoctoral researcher at the Institute of Theoretical …

  1. Doctor Syntax Silver badge

    Do the two buttons include a reset button so you can go back to the beginning again when you go wrong with the long sequence of presses?

    1. elsergiovolador Silver badge

      If you got 420 and you meant to get 69, just finger in plus -420. No need to reset.

      1. AdamWill

        I think you got confused, the thread for the Muskulator is over there. That's the one with only 69, 420 and 80085 buttons.

        1. FIA Silver badge

          The rest are 55378008?

        2. I ain't Spartacus Gold badge

          Surely you also need 1337

    2. katrinab Silver badge

      I haven't read the paper, but you could add all the existing buttons on the calculator to a binary tree, and use the two buttons supplied to navigate through that to the function/input you want, and that could include a go back function.

      1. the spectacularly refined chap Silver badge

        That would get you to any value in the set of represented numbers but this is about continuous numbers, i.e. any two numbers that are not equal have an infinite number of possible numbers between them. You can't construct a tree with that property.

        1. MartinT

          Any calculator having a finite number of keys which are pressed a finite number of times will only be able to generate a countable number of possible outputs.

    3. Anonymous Coward
      Anonymous Coward

      Why do you need an extra button for reset? You can just long press both at the same time.

      Honestly, I think two buttons is a bit lavish for a binary calculator, you can easily setup a binary system with one button.

      Two buttons is the "noob" version.

      1. futursimple

        https://theonion.com/apple-introduces-revolutionary-new-laptop-with-no-keybo-1819594761/

    4. SVD_NL Silver badge

      This gives me flashbacks to programming old PBXs using dial tones. One mistake, and back to the start you go... Especially the systems without any sort of feedback are terrible, blind programming through number sequences.

      1. Anonymous Coward
        Anonymous Coward

        As part of my degree, I learned 68000 machine code on an SBC that consisted of a 68K processor, a few K of RAM, a numeric keypad and an 8 digit VFD display.. No other storage

        I *think* was called a flight board, but it was 30 years ago.

        The reason we used these boards rather than one of the hundreds of PCs the Uni had? A couple, actually. First, the lecturer thought 68K code was more logical, therefore easier to learn than x86. Second, the lack of memory, no storage, and cumbersome input forced us to reduce the amount of mistakes we made, and code efficiently.

        I think a few modern coders could do with experiencing something like that. We might end up with more efficient software.

    5. spold

      ...it has a button to press when it turns blue.

  2. redpawn

    One button

    I have an old car with a one button interface clock. Much like Morse code it uses timing to set. Therefore, I submit that a one button calculator would not only be possible but more efficient as well.

    1. Doctor Syntax Silver badge

      Re: One button

      Just run through all the numbers until you get to the answer you wanted. When they do it with quantum it's called noise reduction.

      Ideal for accountants: "What do you want the answer to be?"

      1. The Organ Grinder's Monkey Bronze badge

        Re: One button

        We're always complaining about needlessly complex UIs, but I can't work out if this is the simplest or most complex one that I've ever seen?

  3. This post has been deleted by its author

  4. Phil O'Sophical Silver badge
    Coat

    Jagiellonian University, Kraków.

    Sounds like perverse polish logic to me..

    1. Snake Silver badge

      On the heads of giants

      Funny, but remember that Poles were the first to crack Enigma plus the first to create the operational theory of the bomba / bombe. They have a legacy of fine mathematicians!

  5. Anonymous Coward
    Anonymous Coward

    I can't read PDF on this device and I'm not a mathematician, but a comparison between his approach and lambda calculus might help me understand the former.

    1. breakfast Silver badge

      This does sound very like a calculator implementation of Unlambda, the famously readable and easy to use functional programming language with only a single operator.

  6. steelpillow Silver badge

    Brainfuck

    One button for 0, the other for 1. As long as you know the length of the binary word, you're well away.

    Cheating? So how about three presses to enter a character in Brainfuck. Also Turing complete, and processor independent to boot, but a whole 8 characters to choose from.

    Also cheating? So how come this bright idea isn't?

  7. Spansh

    This sounds very similar to the ultumate RISC CPU with only a single instruction of subtract and branch if negative. I was told about that over 20 years ago. Looking at Wikipedia it seems there are other options too.

    https://en.wikipedia.org/wiki/One-instruction_set_computer#Subtract_and_branch_if_negative

    An interesting thought experiment, but ultimately not useful.

    1. the spectacularly refined chap Silver badge

      Sounds very much like the Manchester Baby so it's as old as the stored-program computer itself.

      1. Yes Me Silver badge

        And you could do a lot with ISZ (increment and skip if zero) followed by JMP on a PDP-8.

      2. spold

        ...and more like a Turing machine

  8. DaveK23
    Holmes

    Godel, Escher, Bach...

    ... contains some fairly good explanations of how few axioms and operations are needed to build a mathematical system, so I find this plausible.

    1. Doctor Syntax Silver badge

      Re: Godel, Escher, Bach...

      Thanks for the reminder. It's a long time since I read it. I must look for my copy.

    2. Bebu sa Ware Silver badge
      Windows

      Re: Godel, Escher, Bach...

      Interestingly EGB was written against a background of another rather more rational flush of "AI."

      Still very readable especially for the extracts from Lem's Cyberiad if you have read his work.

      The introduction to formal systems is extremely gentle and effective.

      I lent/lost my copy - probably 1st ed. too - years ago. :(

      1. DaveK23
        Flame

        I lent/lost my copy

        I was 11 when it came out. I stayed up all night reading my dad's copy and fell asleep. When I woke up, my angle-poise lamp had swivelled down and landed on it, charring a big burnt hole through many pages! (Hence the flames icon!)

        It also prompted me to read my dad's copy of the Cyberiad too. Klapaucius and Trurl were my heroes!

        1. that one in the corner Silver badge

          Re: I lent/lost my copy

          Thankfully, nowadays you can easily buy purple anodised screws; it was always a concern that painting one's own meant that the threads were not as precise as they ought to be.

    3. Anonymous Coward
      Anonymous Coward

      Re: Godel, Escher, Bach...

      SUBLEQs are a fun way of learning a new language. And generally exploring computing principles.

      I made one in powershell as a toy... one input register, one output register, one instruction...

      with instead of a tape or a stack, it has a 2D memory grid, and a 2D program counter, and branch means turn left or right.

      one load instruction, one store. and one magic function that says jump to another 2D grid, so you can have function calls.

      it's a massive pain in the arse to code for. but i got functions for INC, DEC, ABS, MIN, MAX, ADD, MULT, DIV, REMAINDER and MOD

      MULT is fun. because of the way you have to loop around the grid doing repeated addition, 2 * 5 (2 loops adding 5) is a lot faster than 5 * 2 (5 loops adding 2), so the MIN and MAX functions are used to optimize the order of operands to speed it up.

      Fun. But useless. Would be way easier with a stack. But that would defeat the point of the toy.

  9. Chris Gray 1

    *Analog*

    What you all seem to be ignoring is that the article specifically states that this is NOT digital computation.

    (I recall seeing an old analog computer at my university, and that was when I was still a sprout. Even then it hadn't been used for years. Didn't seem very powerful.)

    1. Anonymous Coward
      Anonymous Coward

      Re: old analog computer at my university...

      Am I that old? I set up a problem or two on one during a class. It was fun.

  10. VoiceOfTruth Silver badge

    Apple did this before, for an entire keyboard

    https://www.youtube.com/watch?v=9BnLbv6QYcA.

  11. ComicalEngineer Silver badge

    Favourite calculator...

    I will surrender my HP11C when they take it from my cold dead hand.

    1. Anonymous Coward
      Anonymous Coward

      Re: Favourite calculator...

      Thank God Clive Sinclair didn't read this.

      **New** Sinclair Scientific II

      - 2 buttons

      - 2 digits (One for mantissa, one for exponent)

      Bonus Costdown: No need to screen-print the value of "e" on the case!

    2. Anonymous Coward
      Anonymous Coward

      Re: Favourite calculator...

      I should see if my HP67 still works. Now where did I put it....

  12. Anonymous Coward
    Anonymous Coward

    It won't be long before Micro$lop add a CoPrat button.

  13. C R Mudgeon Silver badge

    It sounds like the Pure Math equivalent of a Turing machine.

    I'll trust him that it's a useful theoretical construct, but I wouldn't want either one on my desk.

    1. Androgynous Cupboard Silver badge

      I was thinking the analog equivalent of the NOR gate. Good enough to get Apollo 11 to the moon.

      1. C R Mudgeon Silver badge

        That too.

    2. Lee D Silver badge

      Correct.

      However, they often prove extremely useful in terms of working out what's possible and not (computability), and in boiling down functions to primitives which are much easier to prove, manipulate, derive, etc.

      This is more akin to finding an "all integers can be expressed as the product of primes" kind of answer, but for literal mathematical operations.

      It's not rigorous mathematics, it reads far more like a PhD etc. student who's ran off and found something particularly interesting that nobody has done before, but by the look of it (as just a maths grad) it looks like it would have uses in analysing mathematical operations, forming new ones, boiling them down, linking other proofs together, etc.

      I like it. I'm gonna read it properly over the weekend, just because I like it. And, honestly, that's the BEST kind of maths, which people who don't enjoy maths will never understand. It might be wrong. It might be right. It might be useful. It might be worthless. It might form a whole new area of mathematics or computer science (which is really just applied maths...). But whatever it is, it's quite simple, elegant, not obvious, and yet could prove useful.

  14. goblinski Silver badge

    Can't help but remembering how genius my ZX Spectrum's keyboard was supposed to be, what with the preprogrammed BASIC commands on it, and how amazingly idiotic the one-button remote control on my RC Porsche 928 was. The one with the L/R and F/R joysticks was like 30% more expensive.

    I am to this day proud I remember how the one-button remote worked. Mostly.

  15. anotherblowhard

    I've seen his work...

    Does he work for the UX dept at MS by any chance?

    1. xc8

      Re: I've seen his work...

      GNOME for sure...

  16. Spherical Cow

    What happens when you press both together?

    Does it take a screenshot?

  17. cageordie

    You just need something to decode the bitstream and perform the actions.

    So... this is like a data pin and a clock. What I am doing now just ends up as a series of 1s and 0s. So sure. I can send "arctan(0.245)=" and it can cough out the answer. Of course there's the problem that it isn't in any way useful. You could do it in morse code too. Lots of people have shown they can use that. This is one of those things that's trivially true but also pointless.

    1. Simon Harris Silver badge

      Re: You just need something to decode the bitstream and perform the actions.

      But in a digital system the value you get for arctan(0.245) is going to be an approximation, even 0.245 itself could be an approximation.

      What the paper here is trying to do is synthesise mathematical functions from a single type of building block. If you could make arctan(x) out of such a collection of blocks, and feed 0.245 into it, mathematically you would get exactly arctan(0.245) out. Further, if exp and ln are defined for complex numbers, your synthesised function should mathematically work on complex numbers too.

  18. anonymous boring coward Silver badge

    Good one!

    Article came out on April 1st, by any chance?

  19. Andy3

    Nah. I've owned mobile phones that use that '3 press sequential' text entry system and it's enough to drive anyone insane. I assume this is an April Fool?

  20. Doctor Evil

    Astonishing, really!

    "The two-input gate also produces constants including π, e (Euler's number, 2.71828...), and i (the square root of minus one)."

    This is pure genius. No calculator that I have ever owned -- even the estimable HP-15C -- has been able to show me even an approximation of the square root of minus one as a real number, which is what "produces constants" here would seem to imply.

    The HP did handle complex math, but that's rather another matter ...

    1. Peter Gathercole Silver badge

      Re: Astonishing, really!

      I know of several other calculators that could work with imaginary numbers. I think that the Texas SR52 could, and I know that the Commodore SR4190R could because I had one, and I also think that at least one of the Casio calculators in the wallet with a secondary keyboard on the flap (FX-450?) also had this capability.

      I don't have any of these calculators any more, unfortunately. The Texas SR52 was my older brother's, I lost the Casio one holiday in a way that was always a mystery to me, and the Commodore was cleared out of my parents house (along with original recordings of the first broadcast of the Hitchhikers Guide to the Galaxy radio show - something I will never forgive) when they downsized.

      1. Simon Harris Silver badge

        Re: Astonishing, really!

        Not the fx450 - the flap there was just for standard scientific functions and hex digits (or the fx451, which was basically a fx450 with solar panels that worked other than at mid-day in the Sahara). It could do polar<->rectangular conversion, which you may be thinking of on that panel, but didn't have complex numbers.

        The fx991 series is apparently the Casio to go to for complex numbers these days. Historically it was the fx100D and fx570D.

    2. NXM Silver badge

      Re: Astonishing, really!

      Marvin the paranoid android did. But he didn't tell us what it was.

  21. xc8

    My slider rule...

    has no buttons at all!

    1. Bebu sa Ware Silver badge
      Coat

      Re: My slider rule...

      The distance between the venerable slipstick and your common garden variety dipstick possibly not that great.

      I don't doubt that there is some probably deep mathematical cleverness, blindingly obvious to the pure mathematician - if not the applied - but to my naive eye I am not sure that heavy lifting isn't being done by Euler's e¡θ = cos θ + ¡sin θ (⇒e¡π =–1)

      My guess is that you can go a fair way with any g(x, y) =def f(x) ★ f–1(y) The choice of binary operator ★ probably the more crucial of f,★ but some journeys are also merely a distraction. ;)

  22. Torben Mogensen

    Unicode

    You can type in any mathematical formula using Unicode characters, and using, for example, UTF-8 encoding, you can type in the bits of any character sequence using only two buttons. So two buttons suffice to write any mathematical formula. I don't see much new here -- we all know that everything can be encoded as bit sequences.

    1. Lee D Silver badge

      Re: Unicode

      Because that's a real dumb summary that they've used in the article.

      The fact that you can, from two universal mathematical concepts - a function and a digit 1 - form mathematical functions as complex as trigonometry, transcendental constants, etc. in just a few steps is what's useful.

      It could also mean that you could - if it is universal - break down any formulae into a small, compact binary tree of those two elements combined, which would also be useful to prove equivalence / equality between different formulae, etc.

      If it can indeed be formally proven, and it can be expanded to even a majority of mathematical functions, then we could see it pop up in proof systems and the like.

      Nobody is going to sit there calculating logs and exponentials to find "2", that's not what it's for.

      But if you can build all of maths from 2 simple building blocks, and arrange all formulae to fit into a compact binary tree, you can start pulling patterns, finding equivalents, finding routes through that tree's "graph" (mathematical, from graph theory) to find connections, etc.

  23. sarusa Silver badge
    Angel

    Technically you can do this with just one button

    As long as we're getting this ridiculous and absolutely not humanly doable, you just need to assign long press to 1 and short press to 0, and then you use 16 bits (float) for arguments and 16 bits for operator and then do RPN with that. If you want to argue 16 bits isn't enough precision, fine, make it 32 or 80, or make the first couple bits a length indicator so you can variable length tokens.

    All you need is the MOV instruction on x86 to be Turing complete if you don't care how tedious and crazy and slow it is.

    1. Anonymous IV
      Facepalm

      Re: Technically you can do this with just one button

      > you just need to assign long press to 1 and short press to 0

      If only Morse had had that insight when he was devising his Code...!

      1. sarusa Silver badge

        Re: Technically you can do this with just one button

        Morse was crippled by the practicality of having a meaty fleshbag on either side who needed to actually properly send and then interpret it. Applied math is so *filthy*, those *peasants*.

  24. Anonymous Coward
    Anonymous Coward

    Arsinh...

    Are we sure he isn't just "arsinh" about?

  25. Anonymous Coward
    Anonymous Coward

    Not read the paper but remember somebody doing something similar with Redstone in Minecraft

  26. bloggsy
    FAIL

    IT'S MATHS NOT MATH you American HALFWITS. And the days come before the MONTHS.

    1. Anonymous Coward
      Anonymous Coward

      Don't be so hard on them, their brains have rotted from reaching from the meth when we told them to just rub down with some meths.

    2. Dizzy Dwarf
      1. theOtherJT Silver badge

        You missed the opportunity to set it to greyscale mode.

  27. singasong

    I could do better.

    And I pretend I can make most of basic math with NO buttons. At all !

  28. FIA Silver badge

    Okay, it's bugging me now... does anyone know what make/model of calculator that is in the article image?

    What's the 'sen' button?

    Is it AI?

    Oh... no... I googled. It turns out it's a Spanish layout, probably a Casio fx-991SP X II?

    Well, I've been culturally enriched for the day, cheers. :)

    1. Simon Harris Silver badge
      Happy

      You could have posted your update before I spent 10 minutes on a voyage around the internet looking at calculator keyboards, and coming to the same conclusion!

    2. sedregj
      Windows

      This is el Reg!

  29. Paul Hovnanian Silver badge

    University, Kraków

    You folks already gave us RPN. Quit while you are ahead.

  30. TheTut
    Joke

    No buttons for me.

    My "Magic 8 Ball" has no buttons, no batteries, and answers all questions.

  31. Pulled Tea Bronze badge
    Mushroom

    Wait, isn't this… kind of like… Gödel Numbering?

    Like, you could do at least a good fraction of mathematics (if not all or most of mathematics) as a series of two symbols, which means it can be transcribed as a binary digit (0s and 1s), which means it can be represented as a binary number, which means it can be represented as a natural number, which means it's basically Gödel Numbering?

    I mean, it's not practical — the discrete maths version of it is Church encoding, but the fact that this can represent transcendental and irrational numbers is pretty cool. Plus, if you can represent this as a electronic circuit, that means you can encode a good part of maths into circuitry.

    The real question would now be what isn't represented.

    1. Graham Cobb

      Re: Wait, isn't this… kind of like… Gödel Numbering?

      The real question would now be what isn't represented.

      Indeed - that was my first thought when I saw the article. Just like pairs of integers (with a division function) allows you to represent all rational numbers - but no irrational numbers (sqrt(2) for example is easy to prove is not included). So what class of numbers cannot be represented with this scheme?

  32. anthonyhegedus Silver badge

    Morse?

    You could do it all with just one button and issue commands to it in morse code.

    I'm still struggling to understand the real-world application and practicality of this.

    .-- .... .- - / .. ... / -.--. . / - --- / - .... . / .--. --- .-- . .-. / --- ..-. / .--. .. / - .. -- . ... / .. -.--.- / .-.-. .----

  33. Dinanziame Silver badge
  34. jiho

    John Napier would be proud.

    But can it do astrological charts?

  35. oliversalmon

    Super Reduced Instruction Set

    I've always wondered if you could create an assembler with just mov, jmp and add :)

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon