Answers.Body: <h1>Yes, of course, you can</h1>
  
  <p>As <a href="https://bricks.stackexchange.com/users/708/jncraton">jncraton</a> mentioned in a comment:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <h1>Logic gates in LEGO</h1>
  
  <p>As <a href="https://bricks.stackexchange.com/a/112/6174">you can see here</a> folks have put extensive work into creating logic gates in LEGO.  The <a href="http://web.archive.org/web/20120203015520/http://keshavsaharia.com/2011/05/29/lego-logic/" rel="nofollow noreferrer">article referenced</a> 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 <a href="https://en.wikipedia.org/wiki/NAND_logic" rel="nofollow noreferrer">NAND gates can do it all</a>.</p>
  
  <h1>Binary counters</h1>
  
  <p>As <a href="http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/bincount.html" rel="nofollow noreferrer">this articles shows</a> you can build a binary counter out of flip-flops and NAND's.  And as <a href="https://en.wikipedia.org/wiki/Flip-flop_(electronics)" rel="nofollow noreferrer">wikipedia shows</a> you can make a variety of flip-flops out of logic gates.</p>
  
  <h1>Now put it together</h1>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-23T13:21:53.270Z
Answers.LastActivityDate: 2017-07-23T13:21:53.270Z
Answers.UserDisplayName: chicks
Answers.Body: <p>You could adapt the following mechanical binary counter from wooden pieces to Lego</p>
  
  <p><a href="https://www.youtube.com/watch?v=uotLQjvaG34" rel="nofollow noreferrer">https://www.youtube.com/watch?v=uotLQjvaG34</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-13T20:46:05.133Z
Answers.LastActivityDate: 2017-02-13T20:46:05.133Z
Answers.UserDisplayName: Craig
Answers.Body: <p>The answer is yes: This is a "mechanical counter" with the base being 2. 
  Google for "mechanical binary counter design". </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-13T15:10:17.660Z
Answers.Text: Welcome to LEGO Answers! 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. Can you expand your answer to help with that?
Answers.UserDisplayName: jncraton
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-13T12:52:19.217Z
Answers.LastActivityDate: 2017-02-14T10:54:02.130Z
Answers.LastEditDate: 2017-02-14T10:54:02.130Z
Answers.UserDisplayName: Grimaldi
Body: <p>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.</p>
  
  <p>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!</p>
  
  <p><a href="https://i.sstatic.net/Z6xMN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Z6xMN.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-23T21:13:34.033Z
Comments.Text: 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.
Comments.UserDisplayName: PGmath
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-24T15:10:13.000Z
Comments.Text: 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?
Comments.UserDisplayName: Parth Raghav
Tags: <technic><electronics><mechanical>
Title: Is it possible to build a decimal to binary converter (binary counter) with LEGO?
UserDisplayName: Parth Raghav
ThreadText: # Is it possible to build a decimal to binary converter (binary counter) with LEGO?
  
  (Asked by: username_0 on 2016-07-23)
  
  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!
  
  [![enter image description here](https://i.sstatic.net/Z6xMN.png)](https://i.sstatic.net/Z6xMN.png)
  
  **Tags:** technic, electronics, mechanical
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: Hi @username_1, 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?  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2017-07-23. Score: 1
  
  # Yes, of course, you can
  
  As [username_5](https://bricks.stackexchange.com/users/708/username_5) 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](https://bricks.stackexchange.com/a/112/6174) folks have put extensive work into creating logic gates in LEGO. The [article referenced](http://web.archive.org/web/20120203015520/http://keshavsaharia.com/2011/05/29/lego-logic/) 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](https://en.wikipedia.org/wiki/NAND_logic).
  
  # Binary counters
  
  As [this articles shows](http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/bincount.html) you can build a binary counter out of flip-flops and NAND's. And as [wikipedia shows](https://en.wikipedia.org/wiki/Flip-flop_(electronics)) 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.
  
  
  ---
  
  ### Answer by username_3 on 2017-02-13. Score: 0
  
  You could adapt the following mechanical binary counter from wooden pieces to Lego
  
  <https://www.youtube.com/watch?v=uotLQjvaG34>
  
  
  ---
  
  ### Answer by username_4 on 2017-02-13. Score: 0
  
  The answer is yes: This is a "mechanical counter" with the base being 2.
  Google for "mechanical binary counter design".
  
  > **Comments:**
  > **username_5**: Welcome to LEGO Answers! 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. Can you expand your answer to help with that?  
  
  ---
  
  