Calculator Tutor Needed

  • TheTempest
    10th Aug 2011 Member 0 Permalink
    I understand binary, I can create Dec-To-Bin converters easily. However, I would like to create a basic, single digit addition/subtraction calculator. I have a keypad, and a Dec-To-Bin converter already created. I am clueless as to what I do next. If anyone is willing to help me with this, please do so.


    What I have so far;

    (Ignore the title, I created this with a different idea in mind, but now I am interested in creating a calculator.)
  • vanquish349
    10th Aug 2011 Member 0 Permalink
    you will have to build a full adder or use a series of and gates to you answer(i don't recommend using and gates they are not really calculators and they take massive space for more bits).
  • Cr15py
    10th Aug 2011 Member 0 Permalink
    Addition is an XOR with carrying gate, it's not that hard to make. Either google it or look at other saves. I forget what subtraction is, I think it's AND but I'm not sure.
  • TheTempest
    10th Aug 2011 Member 0 Permalink
    Hmm... Okay, thanks.
  • vanquish349
    10th Aug 2011 Member 0 Permalink
    by the way an xor with a carrying gate is called a full adder
  • jalfor
    10th Aug 2011 Member 0 Permalink
    @TheTempest (View Post)
    Full adder is best, because it allows subtraction as well as addition more easily and it's smaller when you try making the thing bigger. Also, if you need to do multiplication, you can look at my thing, it is kinda confusing and it's huge because I made it ages ago and haven't got around to shrinking it. Really, with that, just shift and add. division...haven't worked that one out yet.

    @Vanquish349
    It isn't, full adders are more complex, an XOR gate with a carry is a half adder.
  • Ace
    10th Aug 2011 Member 0 Permalink
    Check through my saves, I've got an ALU some where in there.
  • vanquish349
    10th Aug 2011 Member 0 Permalink
    @jalfor (View Post)
    with a carry, half adders have no carry
  • limelier
    10th Aug 2011 Member 0 Permalink
    You could just use some lua scripts to link em to our numpad :P