A cool way to explain logic gates with water [video]
twitter.com
twitter.com
http://www.cogpro.com/chapters/E-CruiseOMatic/images/E-Cruis...
Almost all the material I could find about computing with water seems to focus on dynamic gates, essentially completely ignoring the century-old[1] knowledge of hydraulics that's been present all along. Perhaps this shows just how isolated the different disciplines can be.
[1] I have a book from the early 1900s about water-operated elevators, complete with descriptions of all the valving required to control the hydraulic ram. They were logic gates, before they were even called logic gates!
Looks like archive.org has a copy: https://archive.org/details/hydraulicelevato00baxtrich
It's from 1910, so almost 110 years ago.
Input is done by almost lifted doors that can be moved by applying enough man power.
The display is just enormous blocks lifted up.
It should do something important like play pong.
i learned logic gates playing mods for games I was playing... I could have a motion sensor and see when I NOT'd it it made its signal the opposite. I could AND two of my sensors and see that I now had a signal combining both. I think this kind of thing, a model that simulates how logic gates are used gives a much better intuitive understanding of what they're for and how to use them.
I have zero physics background, and this is something I've never understand. I knew what a logic gate did, but the core idea of "how does a gate just know whether it's this AND this" always seemed like magic.
I had a serious lightbulb moment with this video. Although, I had to download it and slowly scrub through several times.
I still don't actually understand how this would work with electricity, but I can see how it's broadly possible.
Put two valves after each other on a pipe. The water can only flow if the first valve AND the second valve are open.
Fork off a pipe into two pipes with a tee, put a valve on each side, and connect the other ends of the valves together with another tee. Water flows through the whole thing if the first valve OR the second valve is open (or both).
That's how it works with electricity too. The valves are themselves controlled with water/electricity too.
I believe something like this is also discussed in Petzold's famous book (https://en.wikipedia.org/wiki/Code:_The_Hidden_Language_of_C... )
He attended engineering school in 1942, around the time that hydraulic systems underwent a resurgence.
Logic Gates with "Yellow Water": https://gfycat.com/radiantimportantfieldmouse
Logic Gates with Slurm: https://i.imgur.com/UJyNd9T.gifv
https://www.youtube.com/watch?v=58nSgVvXVbo
so any "intuition" one might hope to gain from these two pipes will be wrong.
Therefore "explain logic gates" is an incorrect title. It can be used to explain the truth table for AND, but not the gates.
https://en.m.wikipedia.org/wiki/Logic_gate
Why wouldn’t the intuition here be helpful? You can, in fact, build an actual computer out of water based logic gates.
You refer to one of the transistor-based implementations of logic gates. Yes, it works differently.
https://courses.cs.washington.edu/courses/cse370/03au/lectur...
"There are 16 possible functions of 2 input variables: in general, there are 2^(2^n) functions of n inputs"
"And" from the original tweet is just one of them.
One of my favorites is the Digi-Comp II, which uses (in this modern version) laser cut wood, steel balls, and gravity:
https://www.evilmadscientist.com/2012/dcii-first/
There can be real value in explaining logic gates using things you can see and touch and observe in action.
Does that fact (which I never denied) in any way provide the original "pipes" picture any explanatory power, helping somebody to more understand the how the logic gates actually used in our devices function?
I still don't see that any answer here up to now disproved my original claim: "what is happening in the actual logic gates [meaning the gates that are actually used in our devices] has no similarity with that [the pipes thing] at all -- so any "intuition" one might hope to gain from these two pipes will be wrong."
I still claim that.
The "pipes" don't "explain" anything but demonstrate their own functioning.
TTL or CMOS aspects are also not relevant for this discussion, contrary to what "neuralRiot" writes.
Also see what user "zemnmez" wrote here.
You never know when one kind of explanation may give someone an "aha" moment that they didn't get somewhere else. And sometimes it's good to do things like this just for fun.
For example, my very favorite visualizations of sorting algorithms are the Hungarian dancers:
https://www.youtube.com/watch?v=ywWBy6J5gz8
(Turn the sound up to enjoy the music!)
Maybe this is just me, and it feels stupid to admit it, but I felt a definite shift of perspective on really seeing logic gates as inanimate. I had a related shift about F=ma around the same time, which is hard to articulate without sounding even stupider. You want to think of it like "you push, and the object accelerates" when from this nonanimate point of view there is no you causing things, there's only a network of constraints.