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.

[youtube=http://www.youtube.com/watch?v=ZMkiyMTLeOY]

20 thoughts on “Binary Calculator

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

    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.

  4. 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…

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

Leave a Reply to Paul PotterCancel 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.