4-bit adder in Grasshopper (one of my oldies)

14 Likes

It is one of those situations when a student asks:
“Why do I need to learn to code if I can do everything in Grasshopper?”

4 Likes

could you explain for me. Please.

Sure @channelmisai, so this adds two numbers together in the way that your processor does (i.e. using logic gates). These logic gates represent what transistors (or combinations of transistors) do in your CPU. So the idea here is to build something within grasshopper that adds two 4-bit integers (i.e. 0 to 15) together to produce a result. In this case, 4 + 9 = 13.

So basically, we’re building part of a computer within Grasshopper, well emulating one anyway.

7 Likes

Now make it work on two 32 bit floats!

4 Likes