8-bit Binary Calculator

binary_calculator

Don’t feel like shelling out $5 for a fancy factory made calculator that won’t even do binary math? [Jeff] decided to prove his mastery of gates and his disdain for base 10 by building a binary calculator using XOR, AND, and OR chips. Calculations can be input in two ways: through digital logic headers or by three banks of DIP switches used to enter the operator and the two operands. Although limited to addition and subtraction, this is a great way to make sure you really understand digital logic. Take a look at the rough design schematics in his album. The design is modular so if you have one of each gate and a few LEDs sitting around you can give this a whirl.

41 thoughts on “8-bit Binary Calculator

  1. octel, this is what’s called a slow-hacks day.

    I would say that stuff like this is good to have because it’s attainable for those who may actually be in primary school reading this … it’s a hack in that it’s hacked together :) … and if you aren’t interested, clicking on other links is an option :)

  2. On Subject…
    Fun project :) Spreading knowledge is good, some people could learn from this.

    Off Subject…
    I like that i can have selective news on the internet i only wish there was at least a positive and negative indication on the comments section so i could filter out all the hate that goes on…

    Boo to flamers

  3. I built one one of these a few years back. It was fairly painless if you have the schematic. I had a test board and dip switches to enter numbers and operations. The only problem was the 8 bit limitation.

  4. Yeah in tech school we built something like this, although it was actually a full cpu with an instruction set, made out of ttl logic chips… It was called the SAP-1 (simple as possible) I’d say that something that’s sub-par for a 2 year tech school in 1989, probably doesnt qualify for a hack in the year 2009, although that’s just my opinion.

  5. Like it mentions, these are good to ensure you understand digital logic.

    @medix:

    I did too.
    I think I starting learning digital logic when I was in the third grade.

    Seriously:
    Seeing stuff like this on HackaDay makes me very sad.

    Really, I am becoming depressed with the quality of this site. (Just seemed to happen recently) I’ll give it some time to turn back around since it might just be temporary.

    I just think this sites content way more hardcore then it is now (Especially in 2005, I believe that was the peak). But now I think I’ll just go to I-hacked until later this year maybe.
    If there’s no turnaround I guess it’ll be time to remove my HackaDay tattoo.

  6. @ Greg says the guy who’s probably been here less than most of us who are pointing out the obvious.

    Interesting project, back in the 80s/90s, like Dan said, it’s a bit under-par for what this site used to represent. although it seems to be quite on par with the crap you’ve been posting lately, so I guess there’s that.

  7. @pilotgeek well how about a one up on that?
    how about making a quasi-super computer out of recycled school pc’s a pile of celeron/p3/p4 based mobos identical networked together to make a server farm or perhaps doing up a vector processor from arduinos? and i am kinda wonder why all the silly hacks? isn’t makezine doing that stuff already?
    i like more than one hack a day but yeah that is pushing realistic reader patience with kid stuff … either way i want to see some real hacks that involve tearing into an appliance like a tv set or a monitor or heck how about making your own radio controls from scratch? i would kill to have a cell phone disruptor 8->

    /rant

  8. LAME LAME LAME. Not a “hack”. Not interesting enough for “Hack a Day”. If I see too many more basic logic/basic electronics posts on here, I will leave.. and I have no problem doing that. It takes about 2.5 seconds to delete a bookmark. I left ‘hacked gadgets’ when they started posting lame stuff.
    Please set your standards high Hack a Day.

  9. @TJ: Why 2 gate types? NAND gates are very well suited to adder circuits…

    @ex-parrot: This is about 10% of an ALU, depending on just what you’re building. If you need a multiplier (and most ALUs do) they take up a MUCH larger chunk of gates. For a divider you’re stuck with an even bigger chunk of gates.

    My project last semester was a 32-bit 2’s complement kogge-stone [4×4]*[4×4] matrix multiplier. A single multiply unit (IIRC) took somewhere in the neighborhood of 15k gates.

    If circuits such as these intrigue you, Atanua (http://sol.gfxile.net/atanua/index.html)is a much simpler way to test things out without the rat’s nest of a proto board or the pain and agony of wire wrapping. It’s an open source simulator, basically.

  10. Very good project for grade school or someone that has never done any digital electronics. This should be required for all the Arduino lovers that cant wire up a basic circuit to save their life but will buy a zigbee kit to twitter that the button they pushed was pushed.

    Buying kits is not electronics. design a circuit from scratch = electronics.

    It’s like being a script kiddie versus a real programmer.

    This logic calculator is the real stuff.

  11. @octel
    @neimado
    @3Rix
    If you lot don’t like it then why not hack something interesting yourselves? Sorry, I forgot, you’re all too busy wasting your time on here being negative about other people’s real effort.

  12. Most of you seem to forget that some people are relatively knew to all this and still learning…

    its a shame you have your head stuck so far up your asses, just because you know everything doesn’t mean the rest of hackaday’s readers do.

    why post if its going to be negative? give it a bit of thought.

    good post, definately worth doing to increase your understanding of logic gates.

  13. @roger
    it is ok when somebody is new to “this” as you call it, no problem. BUT DONT POST THIS NEWBIE SHIT HERE!

    this used to be the holy grail of hacking you smart dumbass. here you could find the real hot shit!

    this is not arrogant! this is realistic! come on this could be a fucking instructable. this could even be an cover of makezine!
    but please guys, not here.

    and could ANY of the had members PLEASE bother to make a statement about so many readers complaining?

  14. @roger @therian @Matt:
    This is not “learn basic electronics-a day”. This calculator is not a “hack”, it’s something that most people do in grade school as a learning exercise.

    If you think that this is a good entry for Hackaday, then this site is not for you and you are in fact missing the point.
    Try this site instead:
    http://www.play-hookey.com/digital/

  15. @Matt, I hack the shit out of stuff all the time, but I don’t usually post anything, sorry, i’m on to the next hack before i have time to let you all know about what i’m doing. Most of it is NDA stuff anyway, so I simply can’t.

    @noobs – go somewhere else for your logic circuits 101 newby learning shit. This isn’t the forum for it. I hacked a ‘binary calculator’ together out of logic chips when I was 11 years old. It’s really nothing practical or interesting to anyone who considers themselves a ‘hacker’.

    If it turns out that this is the forum for noob stuff, then the real hackers won’t come here anymore.. and you can rename it ‘noob-a-day’. simple as that really.

  16. I was in the first ‘computer lab’ when our school rolled out that program. They sent the (about to retire) typing teacher to a state ‘seminar’ & she returned with our syllabus. This is a keyboard, you use it to make ‘printshop’ make banners like these (happy birthday) on fanfold dotmatrix paper. Oh and yes they did mention binary is 1 & 0 ‘it’s kind of like base10, but you only need 2 fingers’…

    So, Uhmmm, Yeah I’m still waiting for a digital logic class, maybe the new pres will see that I get one.

    I did buy a heathkit book on the subject though.

  17. “Too many gate types. You only get to use OR and NOT gates to prove mastery.”

    I believe the fun way to do it is with precisely two NOT gates plus as many ANDs and ORs as you like.

    This might be a pretty darn basic hack, but it at least brings back some fun memories for me. I reckon it deserves some kudos for the amount of solder fumes they must have absorbed to do something so much easier to do most other ways!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.