8-bit 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 says:

How is a grade-school electronics project considered a “hack”?

-A 555-timer LED flasher!
-Make an multiivbrator oscillator!
-Transformer basics!

2. devin says:

Because it’s interesting?

3. jamieriddles says:

@ octel

I don’t know any grade schoolers that know what logic gates are or binary clocks for that matter

4. emis says:

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 :)

5. N0ko says:

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

6. Very simple. I myself am working on a total cpu from TTL 7400 series logic gates. </3 Hack a Day. If you want digital logic projects, feature "big mess o' wires" again. Steve Chamberlain's an awesome guy :D

7. scarpozzi says:

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.

8. _matt says:

I wish I had this in grade school, I’m barely learning digital logic at age 20 at a university.

9. @jamieriddles: I did, and so did several others I know.

10. Jon says:

Damn it, beat me to the punch. I had it figured out in Atanua with ANDs, ORs, and NOT(and 1 XOR), that makes me sad, I wanted to be the one to firstdo it :(

11. jeff-o says:

@medix: so did I. Grade 10, 11, 12. Could have done it in grade 8 if I’d had the resources…

12. TJ says:

Too many gate types.

You only get to use OR and NOT gates to prove mastery.

13. beStill says:

ah! rat’s nest!

14. schlomo says:

this is cool..

..but why not use an arduino with an ethernet shield hooked up to a hacked wrt router connected to twitter to enter the digits?

15. rallen says:

This is cool. We did this in our Digital Electronics class, in college. It’s a real test when you’re learning logic circuits, and have to design and implement this.

16. Dan K says:

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.

17. 3Rix says:

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:

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.

18. @TJ
why gates?
just use diodes and resistors ^^

19. incognito53 says:

i wish i could be an asshole like mr. i am better than everybody else so i’m going to make everbody dislike me pants

20. Greg says:

Seriously getting tired of the users of this site. If you don’t like it…fucking leave!

21. Zymastorik says:

@ 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.

22. Pilotgeek says:

@schlomo: Hack a Cliche?

/Still waiting on an article about building an arduino out of arduinos…

23. thecityspiders says:

@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

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.

25. This is great. My favourite post in ages – it’s nearly an ALU and a great bit of instruction + ought to be of interest to people in the HaD mindset.

26. Mythgarr says:

@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.

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.

28. Matt says:

@octel
@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.

29. therian says:

@octel

-A 555-timer LED flasher!
-Make an multiivbrator oscillator!
-Transformer basics!

I will be very happy with such schedule

30. Roger says:

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

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.

31. schlomo says:

@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!

32. octel says:

@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.
http://www.play-hookey.com/digital/

33. Yeah, definitely just built one of these in my DLD class today. I’m a college freshman.

@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.

35. McNoob says:

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.

36. McNoob says:

Wait, Did I date myself?

37. sgf says:

“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!

38. Max says:

I can’t acces the page, maybe because i’m from Germany, would pls someone confirm or decline this ?