Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How does a simple calculator work?

  1. Jul 30, 2006 #1
    Well, here is a question that popped into my mind when I was trying to open a simple calculator. Calculators store numbers in binary form, depending on the present or abscense of electrical current, according to http://mathforum.org/library/drmath/view/52503.html". What devices are behind this process? Wires, batteries, semiconductor materials, transistors... how they are put together?

    Do you think the information that Wikipedia provides is sufficient?

    I hope this is a good question. Thank you in advance.
    Last edited by a moderator: Apr 22, 2017
  2. jcsd
  3. Jul 30, 2006 #2

    It's a good question, but can be a long question. What is your education level? I read the website, and the responder glossed over the question. It was done for good reason, because there is a wealth of information that needs to be explained to provide a fulfilling answer. Using wires and batteries is in my opinion a crappy response.... however, I do not have the time to give a better one :) So I'm not really doing you much better, however I'll toss you a few links:

    http://www.play-hookey.com/digital/adder.html [Broken]
    Last edited by a moderator: May 2, 2017
  4. Jul 30, 2006 #3
    My education level is 12th grade (high school). I'm not sure that's how it works in U.S.A. because I do not live there. Thank you for the links.
  5. Jul 30, 2006 #4


    User Avatar
    Gold Member

    Kalouste, if you have any knowledge of how the computer that you're using works (which is discussed pretty much everywhere these days) then you already have the info. A calculator is just an extremely simple computer. It uses the same basic components.
    I don't trust Wiki for anything, but there's a pretty good chance that 'How Stuff Works' will have the subject covered.
  6. Jul 30, 2006 #5
    Ok cool. Well it would take you awhile to build a simple calculator from scratch. Probably a better route that would help you understand one, would be the following.

    Start with a simple programming language (maybe C#, or C++ - you could get c# express for free before, you still might be able too) and build a really basic calculator.

    Next, build it in something a little bit harder to learn, such as assembly. Once you get to assembly, you will see how things are being shifter around in memory.

    Or you could pick up an intro to logic design book at a library (a university technical library would be best) and work your way through that. If you are looking for an easy way to understand it (such as you don't want to invest an entire summer working on it), then Danger's advice is golden.
  7. Jul 30, 2006 #6


    User Avatar
    Science Advisor
    Homework Helper

    Danger is correct a calculator is a small computer.

    If you know almost any programming language you can likely find sample code by searching for "simple calculator program" + language

    If you are more interested in how a computer does math then look up FrogPad's suggestion of Adder and ALU.

    Oddly enough a computer can not subtract.
    It actually does subtraction by adding.
  8. Jul 31, 2006 #7
    I know very little of C++ and VB6. Oddly, I've never done a simple calculator in C++, just a collatz sequence program. But I've done it in VB. I'm currently reading a book about logic by https://www.amazon.com/gp/product/0...927/ref=pd_bbs_1/103-9847181-4294219?ie=UTF8", called The Universal Computer. I expect to learn interesting things from it, because I realised, when reading danger's post, that I know nothing about computers. As for assembly, my cousin is going to show me a device (which, in english, I think it's called 'Automata analyzer' although I'm not sure) that works with that language.

    Thank you all for the links and suggestions.
    Last edited by a moderator: May 2, 2017
  9. Jul 31, 2006 #8
    The abstraction layer from computer to human is quite strong when using a language like VB. However, if you learned decent programming practices while using VB and especially C++ it will help you learn assembly much faster. You'll be amazed how long it takes you to write something that just displays digits on an LED screen. However, it's pretty cool to really see how it works.
    Last edited by a moderator: May 2, 2017
  10. Jul 31, 2006 #9
    By the way, that looks like an interesting book. Is it an easy read?
    Last edited by a moderator: May 2, 2017
  11. Jul 31, 2006 #10
    Last edited by a moderator: May 2, 2017
  12. Nov 4, 2011 #11
    In the 80's I got from a friend a 2.50 $ hand book from Radio Shack titled "Understanding digital electronics".It was developed for Radio Shack by Texas Instruments Learning Center that was at the time leader in manufacturing of Calculators. This book Great. It explains digital electronics by desribing in simple language (but goes into the dept of the machine) for people with little knowledge of electricity- how the calculator works. I am warmly recomanding this book to everbody.knowing it will help also to understand how our daily computers work.
    Try find it second hand on E-bay or mayby Amazon still sells it.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook