# Is it possible to build a decimal to binary converter (binary counter) with LEGO?

I have seen many papers on logic gates built with LEGO, but I want to make a decimal to binary converter. There should be a counter as an input, with each press of the counter, the output 8 block shelve changes its configuration giving a binary conversion of the count.

Please help me as to how can this be achieved or at least how should I start the project given that I am new in logic and boolean algebra!

• The easiest way is to use balls falling down a series of binary switches. The disadvantage is that you will have to reload it with balls every so often. – PGmath Jul 23 '16 at 21:13
• Hi @PGmath, Any alternative, because this approach does not work with a standard apparatus. The LEGO model should be a static model that could be implemented at a molecular level, so any suggestions/alternatives? – Parth Raghav Jul 24 '16 at 15:10
• At a molecular level?? – Caleb Woodman Jul 28 '16 at 4:44

# Yes, of course, you can

As jncraton mentioned in a comment:

The answer to whether this is possible is definitely "yes". NAND gates can be built, and the required logic can be implemented using NAND gates. The questions is primarily about how this can be achieved.

# Logic gates in LEGO

As you can see here folks have put extensive work into creating logic gates in LEGO. The article referenced has AND and NOT gates. You would need to put those together to get the aforementioned NAND gate. If you're not familiar with logic gates it may be surprising that NAND gates can do it all.

# Binary counters

As this articles shows you can build a binary counter out of flip-flops and NAND's. And as wikipedia shows you can make a variety of flip-flops out of logic gates.

# Now put it together

I'm sorry there aren't LEGO-level instructions for making all of this happen, but hopefully those are enough leads for you to figure it out. Good luck. I hope you put this together and turn it into a lovely youtube video or article to show us all how you did it. You'd probably be a hit too on the LEGO convention circuit. You can do it.

You could adapt the following mechanical binary counter from wooden pieces to Lego