Binary Calculator

oooh, love those blue LEDs

[Syst3mX] emailed us about his Binary Calculator earlier this week and it almost slipped into the depths of our inbox. Luckily We noticed it in there today and thought we’d share.

He wanted to be able to calculate binary values without having to jump through hoops or boot up his computer, so he built his own binary calculator. For the brains, he chose an ATTiny2313. He can do basic operations like NOT, AND, OR, XOR, addition, subtraction, multiplication, division and modulo. It isn’t too bad looking either. You can catch a video of it in action after the break.


  1. Whatnot says:

    Cute, but I find it odd that there apparently isn’t a direct input button for each binary digit, but I guess it doesn’t matter.
    Now all it needs is a nice case of some sort.
    Great way to establish geekness.

  2. Cynyr says:

    Looks like you “push” 1’s and 0’s onto the the “stack” that is each number. so it makes easy if you have 1001010. Plus you would need 2 buttons per digit then as well.

    I’m wondering how his switch matrix works. Seems that if you pressed 2 buttons at once it would register a third instead. Unless the source lines are at different voltages?

  3. Vadim says:

    @Cynyr if you press two buttons at once it will do nothing at all because that option is not defined in the code.

  4. Tom says:

    On a normal calculator, you also have to ‘stach’ each digit.

  5. therian says:

    when hipsters will learn to control serial LCD displays ?

  6. NatureTM says:


    Hipsters know that hipster cred is given on a per-blue-led basis. Bonus points for decatrons and nixies.

  7. Paul Potter says:

    Very cool. Great device.

  8. Alexander Rossie says:

    sweet love it.

  9. Cynyr says:


    So you set the rows high, and read the columns and then the columns high and read the rows? If so couldn’t the state of the switch change between reads (yes i know it takes a very short amount of time to do both reads, and I’m not sure a human could do it)?

    If you don’t swap highs and lows, how can you know which row/column was pressed, as you are only sensing rows or columns?

    Also I read the bit about charlieplexing switches, but that method seems to require a diode per switch.

  10. Simon says:

    Love the notes in the video, could be a surprisingly useful thing to have around, especially when working with direct port manipulation or bitfeilds. Could make quite a cool clock too… Just saying…

  11. amk says:

    Cool. Any plans on designing and publishing a board? This would be a great educational project for just about anyone interested in electronics/computing.

  12. Wolf says:

    i can’t imagine ever feeling the need for one of these, but it’d be great as a kit/teaching-aid. This guy should talk to sparkfun.

  13. Sebi says:

    Would be cool with 40XX ics :D
    or relays :D

  14. Vadim says:

    @Cynyr i just put a little delay and that solves the bouncing problem.

  15. M4CGYV3R says:

    This is great. It’s one of the first programs they teach when learning binary and programming, and it works nicely with a microcontroller.

    Would love to see them flying off the shelves at ThinkGeek or somewhere in a snazzy plastic case with an LED matrix instead of just the LEDs. Then you could display other messages too or make selecting the operations graphical.

  16. cmholm says:

    If I were a killjoy, I’d suggest a trip to eBay for an old TI Programmer ($) or HP-16C ($$$). But, this looks like ‘way more fun.

  17. this is great for schools, to show the kids how binary operations work :)

  18. Ivan says:

    Nice! I want to build one for myself.

  19. Sodor says:


  20. zunezune says:

    I will build this.

    Thanks Syst3mX

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,520 other followers